29.08.2009, 12:19
I have a problem with this command,when i type /admins it gives the LEVEL and the ID of the first admin,
for example i logged in first so when i type /admins it shows my ID and my LEVEL to all the admin!
i think it's something with the loop but i haven't figured it out yet.
thanks alot!
for example i logged in first so when i type /admins it shows my ID and my LEVEL to all the admin!
i think it's something with the loop but i haven't figured it out yet.
Quote:
if (strcmp(cmd, "/admins", true) == 0) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_GRAD1, "Admins Online:"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 133 { GetPlayerName(i, sendername, sizeof(sendername)); format(string, 256, "[Level:%d] %s (ID:%d)", sendername,PlayerInfo[playerid][pAdmin],playerid); SendClientMessage(playerid, COLOR_GREEN, string); } } } } return 1; } |