On entity spawn
Event
RegisterNetEvent("missions_creator:entitySpawned", function(entityType, entity)
end)Parameters
Name
Data Type
Description
Example
-- Just an example you can edit to give keys to spawned vehicles
RegisterNetEvent("missions_creator:entitySpawned", function(entityType, entity)
if(entityType == "vehicle") then
local plate = GetVehicleNumberPlateText(entity)
TriggerEvent("GIVEKEYS", plate)
end
end)Where to insert the code?
Last updated