13.07.2009, 09:10
You declared it out of scope of the other uses.
I have also removed the IsPlayerConnected check, as obviously it is useless to check if the playerid (who typed the command) is online.
pawn Код:
if (strcmp("/joingang", cmd, true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /joingang [gangid 0-9999]");
new id;
id = strval(tmp);
if(id >= 9999 || id <= 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "gangid must be 0-9999");
}
else
{
gChat[playerid] = id;
}
return 1;
}