10.06.2013, 14:10
When I type the command which is under here, it says: "Use /setplayertg [playerid/name]" , which it should say. So when I try to add an ID to that, for example my own, like /setplayertg 0 , it says unknown command.. How can I fix this?
Код:
if (strcmp(cmdtext, "/setplayertg", true ) == 0) { new tmp[256]; tmp = strtok(cmdtext, idx); new otherplayerid; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_LIGHTRED, "Use /setplayertg [playerid/name]"); else if(!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid, COLOR_LIGHTRED, "This player is not connected"); else { SendClientMessage(otherplayerid,COLOR_LIGHTRED,"You've been set to [Team 2] by an [Admin]."); setTG[otherplayerid] = 1; } return 1; }