SetPlayerFightingStyle

SetPlayerFightingStyle

Description:
Function SetPlayerFightingStyle set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default).
Function SetPlayerFightingStyle was added in 0.3a and will not work in earlier versions!
This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key).


Parameters:
(playerid, style)
int playerid The ID of player to set the fighting style of.
int style The fighting style that should be set.


Return Values:
  • 1: The function was executed successfully.
  • 0: The function failed to execute. This means the fighting style specified is not valid.


Examples:
if (strcmp(cmdtext, "/boxing", true) == 0)
{
    SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
    SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to boxing!");
    return 1;
}


Related Functions
The following functions may be useful, as they are related to this function in one way or another.