OnPlayerSpawn: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
28days (talk | contribs)
No edit summary
Line 4: Line 4:


{{FuncSyntax|OnPlayerSpawn(playerid)}}
{{FuncSyntax|OnPlayerSpawn(playerid)}}
{{FuncSyntaxClient|OnPlayerSpawn()}}


{{FuncParameters}}
{{FuncParameters}}

Revision as of 17:06, 4 January 2020

OnPlayerSpawn

Type: Event
Context: Server & Client
Introduced: v1.0

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)

See also