↩ī¸Events

Events can be requested at our discord! (discord.gg/crimem)

When registering these events in different resources, you MUST replace the "GetCurrentResourceName()" to the name of this script.

Example: GetCurrentResourceName..':onRobberyStarted' -> 'cm_pacificrobbery:onRobberyStarted'

Server Side

onCrewJoined
RegisterNetEvent(GetCurrentResourceName()..':onCrewJoined', function(playerId, newCrew)
    -- Code here
end)
onCrewExit
RegisterNetEvent(GetCurrentResourceName()..':onCrewExit', function(playerId, newCrew)
    -- Code here
end)
onPrepBoatDelivered
RegisterNetEvent(GetCurrentResourceName()..':onPrepBoatDelivered', function(playerId, boat)
    -- Code here
end)
onPrepBoatHacked
RegisterNetEvent(GetCurrentResourceName()..':onPrepBoatHacked', function(playerId, boat)
    -- Code here
end)
onHeistStarted
egisterNetEvent(GetCurrentResourceName()..':onHeistStarted', function(crew)
    -- Code here
end)
onHeistEnded
RegisterNetEvent(GetCurrentResourceName()..':onHeistEnded', function(success, reason, crew)
    -- Code here
end)
onXPGained
RegisterNetEvent(GetCurrentResourceName()..':onXPGained', function(playerId, amount, reason)
    -- Code here
end)
onXPRemoved
RegisterNetEvent(GetCurrentResourceName()..':onXPRemoved', function(playerId, amount)
    -- Code here
end)

Last updated