27.04.2016, 11:50
Hello, As you can see from the topic title, I'd like to come up with a command that shows all online administrators on the list, I have been using Karagon's script for a while to learn how things work etc, but I cannot get this command to work.
When sent in game, the command just returns - Current Administrators: and that's it.
I've been trying to figure this out for a long time and have had no luck.
If you could help me out or at least where I'm going wrong, I'd appreciate that.
Thanks guys.
Код:
cmd(admins, playerid, params[]) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, -1, ""); SendClientMessage(playerid, COLOR_ADMIN, "Online Administrators:"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(GetPVarInt(playerid, "AdminLevel") <= 1338) { new admtext[64], sendername[MAX_PLAYER_NAME]; if(GetPVarInt(playerid, "AdminLevel") == 1337) { admtext = "Head Administrator"; } GetPlayerName(i, sendername, sizeof(sendername)); return 1; } else { SendClientMessage(playerid, COLOR_ADMIN, "No online staff members currently found."); return 1; } } } } return 1; }
I've been trying to figure this out for a long time and have had no luck.
If you could help me out or at least where I'm going wrong, I'd appreciate that.
Thanks guys.