Give keys to identifier

Export

exports["vehicles_keys"]:giveVehicleKeysToIdentifier(identifier, plate, type)

Parameters

NameData TypeDescription

identifier

string

The target player identifier/license

plate

string

The vehicle plate

type

string (optional)

The vehicle type. The default will be "temporary". Available types: "temporary", "owned", "other_player"

Example

RegisterNetEvent("vehicle_shop:playerBoughtVehicle", function(playerId, plate)
    local xPlayer = ESX.GetPlayerFromId(playerId)
    local identifier = xPlayer.identifier

    exports["vehicles_keys"]:giveVehicleKeysToIdentifier(identifier, plate, "owned")
end)

Last updated