26.07.2012, 11:06
I have this CMD:
But only /lasercol red and /lasercol blue work. When I try to make my laser yellow or any other color execpt red, it'll become blue. Also when I type an unkown color, the lest message wont come to me.
pawn Код:
CMD:lasercol(playerid, params[])
{
new color[64];
if(sscanf(params, "s[64]", color)) return SendClientMessage(playerid, C_GREY, "USAGE: /lasercol [color]");
{
if(strcmp(color, "red", false)) SetPVarInt(playerid, "color", 19080);
else if(strcmp(color, "blue", false)) SetPVarInt(playerid, "color", 18643);
else if(strcmp(color, "pink", false)) SetPVarInt(playerid, "color", 19081);
else if(strcmp(color, "orange", false)) SetPVarInt(playerid, "color", 19082);
else if(strcmp(color, "green", false)) SetPVarInt(playerid, "color", 19083);
else if(strcmp(color, "yellow", false)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Color not available!");
}
return 1;
}