RU/setPedHeadless
Jump to navigation
Jump to search
С помощью этой функции можно задавать, есть ли у педа голова.
Syntax
bool setPedHeadless ( ped thePed, bool headState )
Required Arguments
- thePed: The ped to check.
- headState: head state, use true if you want the ped be headless, use false to give back the head.
Returns
Returns true if successful, false otherwise
Example
Click to collapse [-]
ServerThis example enables a player to behead themselves, and give them their head back.
function removeMyHead(thePlayer) setPedHeadless(thePlayer, true) -- Removes the players head outputChatBox("You have been beheaded!", thePlayer, 255, 0, 0) -- A confirmation message for the player end addCommandHandler("beheadme", removeMyHead) function giveBackHead(thePlayer) setPedHeadless(thePlayer, false) -- Gives the player a head outputChatBox("You have been given a head!", thePlayer, 255, 0, 0) -- A confirmation message for the player end addCommandHandler("headmeup", giveBackHead)
Смотрите также
- addPedClothes
- createPed
- doesPedHaveJetPack
- getPedAmmoInClip
- getPedArmor
- getPedClothes
- getPedContactElement
- getPedFightingStyle
- getPedGravity
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getValidPedModels
- givePedJetPack
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedFrozen
- isPedHeadless
- isPedInVehicle
- isPedInWater
- isPedOnFire
- isPedOnGround
- killPed
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- removePedJetPack
- setPedAnimation
- setPedAnimationProgress
- setPedAnalogControlState
- setPedArmor
- setPedChoking
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedFrozen
- setPedGravity
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWeaponSlot