GetPedFightingStyle: Difference between revisions
Jump to navigation
Jump to search
(New page: {{Server function}} __NOTOC__ Retrieves the fighting style a player/ped is currently using. ==Syntax== <syntaxhighlight lang="lua"> int getPedFightingStyle ( ped thePed ) </syntaxhighlight> ===Required Argumen...) |
(Added oop syntax) |
||
Line 7: | Line 7: | ||
int getPedFightingStyle ( ped thePed ) | int getPedFightingStyle ( ped thePed ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[ped]]:getFightingStyle|fightingStyle}} | |||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 17:24, 6 August 2016
Retrieves the fighting style a player/ped is currently using.
Syntax
int getPedFightingStyle ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:getFightingStyle(...)
- Variable: .fightingStyle
Required Arguments
- thePed: the ped whose current fighting style ID you wish to retrieve.
Returns
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 |
Example
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 )
See Also
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle