03.08.2010, 10:35
You have to use strtok and cases for /fightstyle _number_ - because there is a space, or just use this instead:
Use: /fightstyle1 and /fightstyle2 instead
pawn Код:
//=============================Fighting Style Help==============================
if (strcmp("/fightstyles", cmdtext, true, 5) ==0)
{
SendClientMessage(playerid,COLOR_YELLOW,"You can select your fight styles with the command /fightstyle <1-6>");
SendClientMessage(playerid,COLOR_YELLOW,"Availible Fight Styles:");
SendClientMessage(playerid,COLOR_YELLOW,"Boxing-1, Kung-Fu-2, Street Fingting-3, Grab-Kick-4, Elbow-4, Normal-5");
return 1;
}
//=============================Fighting Styles==================================
//Boxing
if (strcmp("/fightstyle1", cmdtext, true, 5) ==0)
{
SetPlayerFightingStyle(playerid, 5);
SendClientMessage(playerid,COLOR_YELLOW,"You have selected the Boxing Fight Style!");
return 1;
}
//Kung-Fu
if (strcmp("/fightstyle2", cmdtext, true, 5) ==0)
{
SetPlayerFightingStyle(playerid, 6);
SendClientMessage(playerid,COLOR_YELLOW,"You have selected the Kung-Fu Fight Style!");
return 1;
}
