HU/getPedFightingStyle: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server function | {{Server function}} | ||
__NOTOC__ | __NOTOC__ | ||
Retrieves the fighting style a player/ped is currently using. | Retrieves the fighting style a player/ped is currently using. |
Revision as of 13:39, 7 October 2018
Retrieves the fighting style a player/ped is currently using.
Szintaxis
int getPedFightingStyle ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:getFightingStyle(...)
- Variable: .fightingStyle
- Counterpart: setPedFightingStyle
Kötelező paraméterek
- thePed: the ped whose current fighting style ID you wish to retrieve.
Visszatérési érték
Returns the ped's current fighting style as an integer ID, false if it fails to retrieve a value.
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 |
Példa
This will allow any player to check what fighting style they are currently using, by typing the 'getfightingstyle' command.
function getPlayerFightStyle ( thePlayer, commandName ) local playerstyle = getPedFightingStyle ( thePlayer ) -- store the fighting style in a variable outputChatBox ( tostring(playerstyle), thePlayer ) -- output it to the player end addCommandHandler ( "getfightingstyle", getPlayerFightStyle )
Lásd még
- HU/addPedClothes
- HU/createPed
- HU/getPedAmmoInClip
- HU/getPedArmor
- HU/getPedClothes
- HU/getPedContactElement
- HU/getPedFightingStyle
- HU/getPedGravity
- HU/getPedOccupiedVehicle
- HU/getPedOccupiedVehicleSeat
- HU/getPedStat
- HU/getPedTarget
- HU/getPedTotalAmmo
- HU/getPedWalkingStyle
- HU/getPedWeapon
- HU/getPedWeaponSlot
- HU/getValidPedModels
- HU/isPedChoking
- HU/isPedDead
- HU/isPedDoingGangDriveby
- HU/isPedDucked
- HU/isPedFrozen
- HU/isPedHeadless
- HU/isPedInVehicle
- HU/isPedOnFire
- HU/isPedOnGround
- HU/isPedWearingJetpack
- HU/killPed
- HU/reloadPedWeapon
- HU/removePedClothes
- HU/removePedFromVehicle
- HU/setPedAnimation
- HU/setPedAnimationProgress
- HU/setPedAnimationSpeed
- HU/setPedArmor
- HU/setPedChoking
- HU/setPedDoingGangDriveby
- HU/setPedFightingStyle
- HU/setPedGravity
- HU/setPedHeadless
- HU/setPedOnFire
- HU/setPedStat
- HU/setPedWalkingStyle
- HU/setPedWeaponSlot
- HU/setPedWearingJetpack
- HU/warpPedIntoVehicle