Advertisement
Jura2207

Untitled

Dec 7th, 2018
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. cmd(premiumall, playerid, params[])
  2. {
  3. new string[128];
  4. if(IsPlayerConnectedAndLoggedIn(playerid))
  5. {
  6. if(PlayerInfo[playerid][pAdmin] == 1338) // Admin level 1338.
  7. {
  8. if(AdminDuty[playerid] > 0)
  9. {
  10. new amount;
  11. if(sscanf(params, "d", amount))
  12. {
  13. SendClientMessage(playerid, COLOR_HELP, "KORISTENJE: /premiumall [bodovi]");
  14. return 1;
  15. }
  16. if(amount > 0 && amount <= 300)
  17. {
  18. foreach(new i : Player)
  19. {
  20. if(IsPlayerConnectedAndLoggedIn(i))
  21. {
  22. PlayerInfo[i][pVip] += amount;
  23. // Poruka igracima.
  24. format(string, sizeof(string), "INFO: Dobili ste %d premium bodova od administratora %s.", amount, PlayerName[playerid]);
  25. SendClientMessage(i, COLOR_INFO, string); PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  26. }
  27. }
  28.  
  29. // Poruka adminu.
  30. format(string, sizeof(string), "INFO: Uspjesno ste dali svima na serveru %d premuium bodova.", amount);
  31. SendClientMessage(playerid, COLOR_INFO, string); PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  32. // Upisivanje u log.
  33. format(string, sizeof(string), "Administrator %s je dao svima na serveru %d premium bodova.", PlayerName[playerid], amount); Log(string, "premiumall", 1);
  34. return 1;
  35. }
  36. }
  37. else
  38. {
  39. SendClientMessage(playerid, COLOR_ERROR, "ERROR: Morate biti na duznosti kako bi mogli koristiti admin komande / mogucnosti.");
  40. PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  41. }
  42. }
  43. else
  44. {
  45. SendClientMessage(playerid, COLOR_ERROR, "ERROR: Niste autorizirani da koristite ovu komandu - nemate administrator level.");
  46. PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  47. }
  48. }
  49. return 1;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement