From SA-MP Wiki

Jump to: navigation, search

SetPlayerFightingStyle was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (ENTER by default).

(playerid, style)
playeridThe ID of player to set the fighting style of.
styleThe 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.



This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key).

Example Usage:

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 helpful as they relate to this function in one way or another.