Guest User

Untitled

a guest
Nov 25th, 2018
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. CMD:adminchat(playerid, params[])
  2. {
  3. new mesaj[128], string[128];
  4. if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Nu esti admin.");
  5. if(sscanf(params, "s[128]", mesaj)) return SendClientMessage(playerid, COLOR_SYN, "Foloseste: /adminchat <mesaj>");
  6. {
  7. format(string, sizeof(string), "Admin %s[lv %d]: %s", GetName(playerid), PlayerInfo[playerid][pAdmin], mesaj);
  8. AdminChat(COLOR_AC, string, 1);
  9. }
  10. return 1;
  11. }
  12.  
  13. function AdminChat(color, const string[], level) {
  14. new text[180];
  15. foreach(Player : i) {
  16. if(PlayerInfo[i][pAdmin] >= level) {
  17. format(text, 256, string);
  18. SCM(i, color, text);
  19. }
  20. }
  21. return 1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment