SetPlayerFightingStyle

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!


Description:

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


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


Return Values:

This function does not return any specific values.


Image:32px-Ambox_warning_orange.png

Note

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 useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox