OnPlayerSpawn

From Onset Developer Wiki
Revision as of 08:03, 16 January 2020 by Chloe (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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