GetPlayerFightingStyle

From Multi Theft Auto: Wiki
Revision as of 03:38, 12 April 2007 by Ransom (talk | contribs)
Jump to navigation Jump to search

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