19.03.2009, 18:41
to solve the Unknown Command just add a return true
pawn Код:
if (strcmp("/admins", cmdtext, true) == 0)
{
new string[128]; //Tip: read the topic about string length by ******
for(new i; i < MAX_PLAYERS; i++) //you dont need to declare i as 0 because all values in pawn are at creating 0
{
if(IsPlayerConnected(i))
{
if(Level[i] == 1)
{
if(!string[0]) SendClientMessage(playerid, COLOR_WHITE, "========== Admins Online ==========");
GetPlayerName(i, string, MAX_PLAYER_NAME);
format(string, sizeof string, "Administrator: %s", string);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
return true; //if you return false (that happens when you dont put a return at the end of a command) the text Unknown Command will appear
}