GetPlayerFightingStyle: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 41: | Line 41: | ||
<!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | <!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --> | ||
{{Player_functions}} | {{Player_functions}} | ||
Revision as of 03:38, 12 April 2007
This allows you to retrieve what fighting style a player is currently using.
Syntax
int getPlayerFightingStyle ( player theplayer )
Required Arguments
- theplayer: The player whose current fighting style ID you wish to retrieve
Returns
- Returns the player's current fighting style as an integer ID
- Returns false if it fails to retrieve a value
Example
This will allow any player to check what fighting style they are currently using
addCommandHandler ( "getfightingstyle", "getPlayerFightStyle" ) function getPlayerFightStyle ( player, commandName ) playerstyle = getPlayerFightingStyle ( player ) if playerstyle == 4 then outputChatBox ( "Style: standard" ) elseif playerstyle == 5 then outputChatBox ( "Style: boxing" ) elseif playerstyle == 6 then outputChatBox ( "Style: kungfu" ) elseif playerstyle == 7 then outputChatBox ( "Style: taebo (knees)" ) end end
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState