07.04.2011, 14:38
You can't check like that if the string is equal to something. You have to use strcmp.
Here is how it should be:
Here is how it should be:
Код:
COMMAND: setfightstyle(playerid, params[]) { new fights; if (sscanf(params, "s", fights))SendClientMessage(playerid, 0xFFFFFF, "Usage: /setfightstyle <fightstyle> type /fightlist for a list of styles"); else if(fights == GetPlayerFightingStyle(playerid)) SendClientMessage(playerid, 0xFFFFFF, "You already have that fightingstyle"); else { if(!strcmp(fights, "boxing", true))) SendClientMessage(playerid, 0xFFFFFF, "Your style has been changed to boxing!"); SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING); } return 1; }