05.05.2015, 09:44
Quote:
Код:
CMD:clan(playerid,params[]){ if(sscanf(params,"s",TinyString)) return MSG(playerid,C_RED,"/Clan [Invite/Kick/Join/Leave/SetRank/SetTag]"); if(strval(TinyString) == strval("Invite")) return MSG(playerid,C_RED,"Invite"); else if(strval(TinyString) == strval("Kick")) return MSG(playerid,C_RED,"Kick"); return 1;} |
Quote:
It will not work. You try to check NUMBER with letters!
You need STRCMP. Ex: if(strcmp(s, "Invite")) return MSG(playerid,C_RED,"Invite"); |
pawn Код:
CMD:clan(playerid,params[]){
if(sscanf(params,"s",TinyString)) return MSG(playerid,C_RED,"/Clan [Invite/Kick/Join/Leave/SetRank/SetTag]");
if(strcmp(TinyString, "Invite")) return MSG(playerid,C_RED,"Invite");
if(strcmp(TinyString, "Kick")) return MSG(playerid,C_RED,"Kick");
return 1;}