OnPlayerSpawn: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
{{FuncDescription|Called when a player spawns. This usually happens after they died. Use [[SetPlayerRespawnTime]] to control how long it takes before they respawn.}} | {{FuncDescription|Called when a player spawns. This usually happens after they died. Use [[SetPlayerRespawnTime]] to control how long it takes before they respawn.}} | ||
{{FuncSyntax|OnPlayerSpawn( | {{FuncSyntax|OnPlayerSpawn(playerid)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam| | {{FuncParam|playerid|The player who has spawned.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | <syntaxhighlight lang="Lua"> | ||
function OnPlayerSpawn( | function OnPlayerSpawn(playerid) | ||
end | end |
Revision as of 04:30, 17 November 2019
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)
Parameters
- playerid
The player who has spawned.
Example
function OnPlayerSpawn(playerid)
end
AddEvent("OnPlayerSpawn", OnPlayerSpawn)
See also
Player
- OnPlayerServerAuth
- OnPlayerSteamAuth
- OnPlayerDownloadFile
- OnPlayerStreamIn
- OnPlayerStreamOut
- OnPlayerPickupHit
- OnPlayerJoin
- OnPlayerQuit
- OnPlayerSpawn
- OnPlayerDeath
- OnPlayerWeaponShot
- OnPlayerDamage
- OnPlayerChat
- OnPlayerChatCommand
- OnPlayerInteractDoor
- OnPlayerChangeDimension
Vehicle
- OnPlayerEnterVehicle
- OnPlayerLeaveVehicle
- OnPlayerStateChange
- OnVehicleRespawn
- OnVehicleStreamIn
- OnVehicleStreamOut
- OnVehicleDamage
- OnVehicleChangeDimension
- OnVehicleCreated
- OnVehicleDestroyed
Game
Package
NPC
- OnNPCReachTarget
- OnNPCDamage
- OnNPCSpawn
- OnNPCDeath
- OnNPCStreamIn
- OnNPCStreamOut
- OnNPCChangeDimension
- OnNPCCreated
- OnNPCDestroyed
Object
- OnObjectStopMoving
- OnObjectChangeDimension
- OnObjectCreated
- OnObjectDestroyed
- OnObjectStreamIn
- OnObjectStreamOut