OnPedSpawn: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = onPedSpawn
|side = shared
|type = event
|type = event
|name = onPedSpawn
|games = iii vc sa iv
|usage = a ped spawns
|desc = a ped spawns
|callbackParameters = Event event, Ped ped
|arg1 = Ped ped The ped that has spawned.
|cancellable = false
|note = If the ped is localPlayer, then localPlayer will still be null (it's not set until after this event is triggered for it). You'll need to use a timeout to process things for localPlayer in this event.
|parameter1 = Ped ped The ped that has spawned.
|cancel = false
|notes = If the ped is localPlayer, then localPlayer will still be null (it's not set until after this event is triggered for it). You'll need to use a timeout to process things for localPlayer in this event.
}}
}}

Latest revision as of 20:28, 19 November 2022

Event Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline Not Cancellable

Available since Server 1.0.0, Client 1.0.0

onPedSpawn(Event event, Ped ped)

The onPedSpawn event is invoked when a ped spawns.

Parameters

1) Event event The event object for this event.
2) Ped ped The ped that has spawned.

Attributes

const This event cannot be cancelled.

Notes

  • If the ped is localPlayer, then localPlayer will still be null (it's not set until after this event is triggered for it). You'll need to use a timeout to process things for localPlayer in this event.

Examples

There aren't any examples for this event.

Compatibility

There isn't any compatibility information for this event.

Related

Server Related

icon-iii.png icon-vc.png icon-sa.png OnPedCrouch
icon-iii.png icon-vc.png icon-sa.png OnPedEnterVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedExitVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedFall
icon-iii.png icon-vc.png icon-sa.png OnPedJump
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPedSpawn
icon-iii.png icon-vc.png icon-sa.png OnPedUncrouch
icon-iii.png icon-vc.png OnPedWasted


Client Related

icon-iii.png icon-vc.png icon-sa.png OnPedBusted
icon-iii.png icon-vc.png icon-sa.png OnPedChangeWeapon
icon-iii.png icon-vc.png icon-sa.png OnPedCrouch
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPedDead
icon-vc.png OnPedEnteredVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedEnteringVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedEnterVehicle
icon-vc.png OnPedExitedVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedExitingVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedExitVehicle
icon-iii.png icon-vc.png icon-sa.png OnPedFall
icon-iii.png icon-vc.png icon-sa.png OnPedFireProjectile
icon-iii.png icon-vc.png icon-sa.png OnPedInflictDamage
icon-iii.png icon-vc.png icon-sa.png OnPedJump
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPedSpawn
icon-vc.png OnPedStartClosingVehicleDoor
icon-iii.png icon-vc.png icon-sa.png OnPedStartFightAttack
icon-iii.png icon-vc.png icon-sa.png OnPedStartFightDefend
icon-vc.png OnPedStartOpeningVehicleDoor
icon-iii.png icon-vc.png icon-sa.png OnPedUncrouch
icon-iii.png icon-vc.png icon-sa.png OnPedUseWeapon
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPedWasted