03.06.2010, 21:53
Hello!
I got a problem. I'm trying to do an /admins command using zcmd. It always prints online admins and then "Unknown command".
I'm not sure why there is "Unknown command." message, but when I used strcmp that command worked fine.
I got a problem. I'm trying to do an /admins command using zcmd. It always prints online admins and then "Unknown command".
I'm not sure why there is "Unknown command." message, but when I used strcmp that command worked fine.
pawn Код:
command(admins, playerid, params[])
{
new adminName[MAX_PLAYER_NAME], string[128];
SendClientMessage(playerid, COLOR_WHITE, "Administrators Online:");
for(new i = 0; i <= MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i) && pInfo[i][pAdmin] > 0)
{
GetPlayerName(i, adminName, sizeof(adminName));
format(string, sizeof(string), "%s", adminName);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
return 1;
}