OnClientPlayerSpawn: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (See Also for client player events) |
||
Line 26: | Line 26: | ||
==See Also== | ==See Also== | ||
{{ | ===Client player events=== | ||
{{Client_player_events}} | |||
===Client event functions=== | |||
{{Client_event_functions}} |
Revision as of 12:36, 12 January 2008
This event is triggered when any player, including a remote player, spawns.
Parameters
team hisTeam
- hisTeam: A team element representing the team the player spawned on.
Source
The source of this event is the player that spawned.
Example
This code will create an explosion for the local player when they spawn.
function explosionOnSpawn ( ) -- get the spawned player's position local pX, pY, pZ = getElementPosition ( source ) -- and create an explosion there createExplosion ( pX, pY, pZ, 6 ) end -- add this function as a handler for any player that spawns addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), explosionOnSpawn )
See Also
Client player events
- onClientPlayerChangeNick
- onClientPlayerChoke
- onClientPlayerDamage
- onClientPlayerHeliKilled
- onClientPlayerHitByWaterCannon
- onClientPlayerJoin
- onClientPlayerPickupHit
- onClientPlayerPickupLeave
- onClientPlayerQuit
- onClientPlayerRadioSwitch
- onClientPlayerSpawn
- onClientPlayerStealthKill
- onClientPlayerStuntFinish
- onClientPlayerStuntStart
- onClientPlayerTarget
- onClientPlayerVehicleEnter
- onClientPlayerVehicleExit
- onClientPlayerVoicePause
- onClientPlayerVoiceResumed
- onClientPlayerVoiceStart
- onClientPlayerVoiceStop
- onClientPlayerWasted
- onClientPlayerWeaponFire
- onClientPlayerWeaponSwitch
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled