OnPlConnecting

On player's connecting

Parameters description

Parameter
Type

cb

fun(source: integer, playerName: string, setKickReason: string, deferrals: table)

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

Example

-- Server Side
HRLib.OnPlConnecting(function(_, playerName)
    print(('The player %s is connecting to the server'):format(playerName)) -- txAdmin Console
end)

-- Client Side
HRLib.OnPlConnecting(function(playerName)
    print(('The player %s is connecting to the server'):format(playerName)) -- Each player's console/chat
end)

Last updated