Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:leaders(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new count = 0,string[200];
- foreach(Player,i)
- {
- if(IsPlayerConnected(i))
- {
- SendClientMessage(playerid, COLOR_WHITE, "{ADFF5C}|____ Leaders Online: ____|");
- if(PlayerInfo[i][pSleeping] == 0)
- {
- if(PlayerInfo[i][pLeader] > 0 && PlayerInfo[i][pAdmin] < 4)
- {
- format(string, sizeof(string), "{FF6347}%s {FFFFFF}(%d) - %s", GetName(i),i,NumeFactiune(PlayerInfo[i][pLeader]));
- SendClientMessage(playerid, COLOR_WHITE, string);
- count++;
- }
- }
- else if(PlayerInfo[i][pSleeping] != 0)
- {
- if(PlayerInfo[i][pLeader] > 0 && PlayerInfo[i][pAdmin] < 4)
- {
- format(string, sizeof(string), "{FF6347}%s {FFFFFF}(%d) - %s(AFK)", GetName(i),i,NumeFactiune(PlayerInfo[i][pLeader]));
- SendClientMessage(playerid, COLOR_WHITE, string);
- count++;
- }
- }
- }
- }
- if(count == 0)
- {
- SendClientMessage(playerid,COLOR_WHITE,"{ADFF5C}Nu sunt lideri conectati.");
- }
- else if(count == 1)
- {
- SendClientMessage(playerid,COLOR_WHITE,"{ADFF5C}* Este un lider conectat.");
- }
- else if (count >= 2)
- {
- format(string, sizeof(string), "{ADFF5C}* Sunt %d lideri conectati.", count);
- SCM(playerid, COLOR_WHITE, string);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment