SetPlayerFightingStyle: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
Changes a player's fighting style, most only change the 'special attack' which is done using the Aim and Enter keys.
Changes a player's fighting style, most only change the 'special attack' which is done using the Aim and Enter keys.


enum eFightingStyle
STYLE_STANDARD = 4,
{
STYLE_BOXING,
    STYLE_STANDARD = 4,
STYLE_KUNG_FU,
    STYLE_BOXING,
STYLE_KNEE_HEAD,
    STYLE_KUNG_FU,
// various melee weapon styles
    STYLE_KNEE_HEAD,
STYLE_GRAB_KICK = 15,
    // various melee weapon styles
STYLE_ELBOWS = 16,
    STYLE_GRAB_KICK = 15,
(can someone fill in the rest and tidy it up =))
    STYLE_ELBOWS = 16,
}; (can someone fill in the rest and tidy it up =))


==Syntax==  
==Syntax==  

Revision as of 09:01, 6 March 2007

Changes a player's fighting style, most only change the 'special attack' which is done using the Aim and Enter keys.

STYLE_STANDARD = 4, STYLE_BOXING, STYLE_KUNG_FU, STYLE_KNEE_HEAD, // various melee weapon styles STYLE_GRAB_KICK = 15, STYLE_ELBOWS = 16, (can someone fill in the rest and tidy it up =))

Syntax

setPlayerFightingStyle ( player, int style ) 

Required Arguments

  • Player: Tells the function to give the fighting style to a player
  • Style: A whole integer specifying the style of fighting you want to give to the player

Example

This example sets the player's fighting style to the desired style when he types "style" folldowed by a number from 4 to 16 in console.

addCommandHandler ( "style", "style" ) -- add a command handler for setcash
function style ( player, command, id ) --when the style function is called
	setPlayerFightingStyle ( player, id ) --set players fighting style
end

See Also