MistarA

Untitled

Dec 1st, 2019
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. if(strcmp(cmd, "/eventteam", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. SendClientMessage(playerid, COLOR_GREY, "Event Team Members Online:");
  6. for(new i = 0; i < MAX_PLAYERS; i++)
  7. {
  8. if(IsPlayerConnected(i))
  9. {
  10. if(PlayerInfo[i][pEV] == 1)
  11. {
  12. format(string, sizeof(string), "Ajutor %s (ID: %d) - %s", GetPlayerNameEx(i), i ,PlayerInfo[i][pForumName]);
  13. SendClientMessage(playerid, COLOR_GREY, string);
  14. }
  15. else if(PlayerInfo[i][pEV] == 2)
  16. {
  17. format(string, sizeof(string), "Lider %s (ID: %d) - %s", GetPlayerNameEx(i), i ,PlayerInfo[i][pForumName]);
  18. SendClientMessage(playerid, COLOR_GREY, string);
  19. }
  20. }
  21. }
  22. }
  23. }
  24. if(strcmp(cmd, "/aev", true) == 0)
  25. {
  26. if(IsPlayerConnected(playerid))
  27. {
  28. tmp = strtok(cmdtext, idx);
  29. if(!strlen(tmp))
  30. {
  31. SendClientMessage(playerid, COLOR_GRAD2, "{FFFFFF}Folosire{696969}: /aev [playerid/partofname]");
  32. return 1;
  33. }
  34. new id = strval(tmp);
  35. if(PlayerInfo[playerid][pAdministrator] >= 6)
  36. {
  37. if(IsPlayerConnected(id))
  38. {
  39. if(id != INVALID_PLAYER_ID)
  40. {
  41. if(PlayerInfo[id][pEV] == 1 || PlayerInfo[id][pEV] == 2)
  42. {
  43. format(string, sizeof(string), "Functia de EV ti-a fost scoasa de catre %s", GetPlayerNameEx(playerid));
  44. SendClientMessage(id, COLOR_WHITE, string);
  45. format(string, sizeof(string), "I-ai scos lui %s functia de EV.", GetPlayerNameEx(id));
  46. SendClientMessage(playerid, COLOR_ADMINCMD, string);
  47. PlayerInfo[id][pHOF] = 0;
  48. }
  49. else
  50. {
  51. tmp = strtok(cmdtext, idx);
  52. if(!strlen(tmp))
  53. {
  54. SendClientMessage(playerid, COLOR_GRAD2, "{FFFFFF}Folosire{696969}: /aev [playerid/partofname] [1-ajutor / 2-lider]");
  55. return 1;
  56. }
  57. new val = strval(tmp);
  58. format(string, sizeof(string), "Functia de EV ti-a fost acordata de catre %s", GetPlayerNameEx(playerid));
  59. SendClientMessage(id, COLOR_WHITE, string);
  60. format(string, sizeof(string), "L-ai promovat pe %s ca EV", GetPlayerNameEx(id));
  61. SendClientMessage(playerid, COLOR_ADMINCMD, string);
  62. PlayerInfo[id][pHOF] = val;
  63. }
  64. }
  65. }
  66. else
  67. {
  68. SendClientMessage(playerid, COLOR_LIGHTRED, "Playerul nu este activ.");
  69. }
  70. }
  71. else
  72. {
  73. SendClientMessage(playerid, COLOR_GREY, "Nu esti autorizat sa folosesti comanda!");
  74. }
  75. }
  76. return 1;
  77. }
  78. if(strcmp(cmd, "/eventduty", true) == 0 || strcmp(cmd, "/evduty", true) == 0)
  79. {
  80. if(PlayerInfo[playerid][pEV] >= 1)
  81. {
  82. if(EventDuty[playerid] == 1)
  83. {
  84. format(string, sizeof(string), "[Event Team] %s (ID:%d) este indisponibil.", GetPlayerNameEx(playerid),playerid);
  85. EventMesssage(COLOR_EVENTDUTY,string);
  86. SetPlayerColor(playerid,COLOR_WHITE);
  87. EventDuty[playerid] = 0;
  88. }
  89. else
  90. {
  91. format(string, sizeof(string), "[Event Team ] %s (ID:%d) este disponibil.", GetPlayerNameEx(playerid),playerid);
  92. EventMessage(COLOR_EVENTDUTY,string);
  93. EventDuty[playerid] = 1;
  94. SetPlayerColor(playerid,COLOR_GREEN);
  95. }
  96. }
  97. else
  98. {
  99. SendClientMessage(playerid, COLOR_GREY, "Nu esti autorizat sa folosesti comanda!");
  100. }
  101. return 1;
  102. }
  103.  
  104. CMD:e(playerid, params[])
  105. {
  106. if (PlayerInfo[playerid][pEV] < 1)
  107. {
  108. SendClientMessage(playerid, COLOR_GREY,"Nu esti autorizat sa folosesti aceasta comanda.");
  109. return 1;
  110. }
  111. new szMessage[128];
  112.  
  113. if(sscanf(params, "s[128]", szMessage))
  114. {
  115. return SendClientMessage(playerid,COLOR_GREY,"USAGE: (/e)vent [message]");
  116. }
  117.  
  118. if(Achat == 1 && PlayerInfo[playerid][pEV] < 2)
  119. {
  120. SendClientMessage(playerid, COLOR_GREY, " Canalul Event este inchis.");
  121. return 1;
  122. }
  123.  
  124. new szString[129+1+MAX_PLAYER_NAME+3];
  125.  
  126. format(szString, 129+1+MAX_PLAYER_NAME+3, "[Event-Chat] %s: %s", GetPlayerNameEx(playerid), szMessage);
  127.  
  128. foreach(Player, i)
  129. {
  130. if(PlayerInfo[i][pEV] >= 1)
  131. {
  132. SendPlayerExtendedMessage(i, 0xF97804FF, szString);
  133. }
  134. }
  135.  
  136. return 1;
  137. }
Advertisement
Add Comment
Please, Sign In to add comment