O cуdigo deveria ser assim, jб que caso ele digita um numero diferente de 1~4 retorna a mensagem. ao invйs do outro, que estб sendo atribuнdo caso seja diferente de 4. tambйm poderia usar apenas if's.
pawn Код:
CMD:smoke(playerid,params[])
{
new IDanims;
if(sscanf(params, "i", IDanims)) return SCM(playerid, 0xEFEFF7AA, "|USO| /smoke [1~4]");
if(IDanims < 1 IDanims > 4) return SCM(playerid, 0xEFEFF7AA, "|USO| /smoke [1~4]");
if(IDanims == 1)
ApplyAnimation(playerid, "SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
else if(IDanims == 2)
ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
else if(IDanims == 3)
ApplyAnimation(playerid, "SMOKING", "M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0);
else if(IDanims == 4)
ApplyAnimation(playerid, "SMOKING", "M_smk_out", 4.0, 1, 0, 0, 0, 0);
return 1;
}