SHARE
TWEET

Untitled

a guest Aug 12th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new AdminLevel[MAX_PLAYERS]; //admin define
  2.  
  3. dcmd_makeadmin(playerid, params[]) //komanda /makeadmin
  4. {
  5. new user, lvl;
  6. if(IsPlayerAdmin(playerid) || AdminLevel[playerid] > 2)
  7. {
  8. if(sscanf(params, "ui", user, lvl)) return SendClientMessage(playerid, COLOR_GRAD1, "/makeadmin [ID] [level]");
  9. if(lvl > 3) return SendClientMessage(playerid, COLOR_GRAD1, "Admin level moze biti samo 1 | 2 | 3");
  10. AdminLevel[user] = lvl;
  11. new string[128];
  12. format(string, sizeof(string), "Admin %s vam je namjestio admin level na %d.", PlayerName(playerid), lvl);
  13. SendClientMessage(user, COLOR_NEWBLUE, string);
  14. format(string, sizeof(string), "Postavili ste igracu %s admin level %d.", PlayerName(user), lvl);
  15. SendClientMessage(playerid, COLOR_NEWBLUE, string);
  16. }
  17. return 1;
  18. }
RAW Paste Data
Top