OnPlayerSpawn: Difference between revisions
From Onset Developer Wiki
No edit summary |
m Player server events. |
||
Line 18: | Line 18: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{PlayerServerEvents}} | |||
Revision as of 07:53, 16 January 2020
Description
Called when a player spawns. This usually happens after they died. Use SetPlayerRespawnTime to control how long it takes before they respawn.
Syntax
OnPlayerSpawn(playerid)
Client Syntax
OnPlayerSpawn()
Parameters
- playerid
The player who has spawned.
Example
function OnPlayerSpawn(playerid)
AddPlayerChat(playerid, "You have spawned, is this a surprise?")
end
AddEvent("OnPlayerSpawn", OnPlayerSpawn)