03.08.2012, 15:36
Whenever I type /smoke 1 or /smoke 2 or 3 in-game, I get an error message that it's an unknown command. I have /aim command that's made in the exactly the same way, and it works great. Can someone help me out please?
pawn Код:
if (strcmp("/smoke", cmdtext, true) == 0)
{
if(pCriticallyInjured[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] Critically injured!");
if(!IsPlayerInAnyVehicle(playerid))
{
if (!strlen(cmdtext[9])) return SendClientMessage(playerid,COLOR_USAGE,"[USAGE:] /smoke [1-3]");
switch (cmdtext[9])
{
case '1': ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
case '2': ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
case '3': ApplyAnimation(playerid,"SMOKING", "M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0);
default: SendClientMessage(playerid,COLOR_USAGE,"[USAGE:] /smoke [1-3]");
}
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] Not possible in a vehicle.");
}
return 1;
}