Guest User

Untitled

a guest
Feb 5th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. CMD:leaders(playerid, params[])
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. new count = 0,string[200];
  6. foreach(Player,i)
  7. {
  8. if(IsPlayerConnected(i))
  9. {
  10. SendClientMessage(playerid, COLOR_WHITE, "{ADFF5C}|____ Leaders Online: ____|");
  11. if(PlayerInfo[i][pSleeping] == 0)
  12. {
  13. if(PlayerInfo[i][pLeader] > 0 && PlayerInfo[i][pAdmin] < 4)
  14. {
  15. format(string, sizeof(string), "{FF6347}%s {FFFFFF}(%d) - %s", GetName(i),i,NumeFactiune(PlayerInfo[i][pLeader]));
  16. SendClientMessage(playerid, COLOR_WHITE, string);
  17. count++;
  18. }
  19. }
  20. else if(PlayerInfo[i][pSleeping] != 0)
  21. {
  22. if(PlayerInfo[i][pLeader] > 0 && PlayerInfo[i][pAdmin] < 4)
  23. {
  24. format(string, sizeof(string), "{FF6347}%s {FFFFFF}(%d) - %s(AFK)", GetName(i),i,NumeFactiune(PlayerInfo[i][pLeader]));
  25. SendClientMessage(playerid, COLOR_WHITE, string);
  26. count++;
  27. }
  28. }
  29. }
  30. }
  31. if(count == 0)
  32. {
  33. SendClientMessage(playerid,COLOR_WHITE,"{ADFF5C}Nu sunt lideri conectati.");
  34. }
  35. else if(count == 1)
  36. {
  37. SendClientMessage(playerid,COLOR_WHITE,"{ADFF5C}* Este un lider conectat.");
  38. }
  39. else if (count >= 2)
  40. {
  41. format(string, sizeof(string), "{ADFF5C}* Sunt %d lideri conectati.", count);
  42. SCM(playerid, COLOR_WHITE, string);
  43. }
  44. }
  45. return 1;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment