RU/setPedFightingStyle
Jump to navigation
Jump to search
Изменяет стиль драки педа. Большинство стилей влияют только на специальную атаку, которая выполняется по связке кнопок прицеливания (правая кнопка мыши) и Enter (F).
Syntax
bool setPedFightingStyle ( ped thePed, int style )
Required Arguments
- thePed: The ped whose fighting style to change.
- style: The fighting style ID to apply.
Fighting Styles:
Fighting Style | ID |
STYLE_STANDARD | 4 |
STYLE_BOXING | 5 |
STYLE_KUNG_FU | 6 |
STYLE_KNEE_HEAD | 7 |
STYLE_GRAB_KICK | 15 |
STYLE_ELBOWS | 16 |
Returns
Returns true in case of success, false otherwise.
Example
This example sets the player's fighting style to the desired style when he types "setstyle" followed by a number from 4 to 16 in console.
function consoleSetFightingStyle ( thePlayer, commandName, id ) if thePlayer and id then -- If player and ID are specified local status = setPedFightingStyle ( thePlayer, tonumber(id) ) -- set the fighting style if not status then -- if that failed outputConsole ( "Failed to set fighting style.", thePlayer ) -- show a message end end end addCommandHandler ( "setstyle", consoleSetFightingStyle )
Смотрите также
- 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