OnPlSpawn

On player spawns (This is also triggered when resurrect player)

Parameters description

ParameterTypeDescription

cb

fun(source: integer)

The function that is being triggered

the source parameter in the callback function does not exist in the client side field

Example

-- Server Side
HRLib.OnPlSpawn(function(source)
    print(('The player %s joined right now'):format(GetPlayerName(source)))
end)

-- Client Side
HRLib.OnPlSpawn(function()
    print('Welcome to our server! Enjoy it!')
end)

Last updated