SetPedOnFire
From Multi Theft Auto: Wiki
This function can be used to set a ped on fire or extinguish a fire on it.
Syntax
bool setPedOnFire ( ped thePed, bool isOnFire )
OOP Syntax Help! I don't understand this!
- Method: ped:setOnFire(...)
- Variable: .onFire
- Counterpart: isPedOnFire
Required Arguments
- thePed: The ped that we want to set/unset
- isOnFire: true to set the ped on fire, false to extinguish any fire on him
Returns
Returns true if successful, false otherwise
Example
This script will set player on fire when they fall into water.
Click to collapse [-]
ClientaddEventHandler("onClientResourceStart", resourceRoot, function () setTimer( function() if isElementInWater(getLocalPlayer()) then setPedOnFire ( getLocalPlayer(), true ) end end, 1000, 0) end )
See Also
- addPedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedClothes
- getPedContactElement
- getPedFightingStyle
- getPedGravity
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress