Advertisement
Jura2207

Untitled

Dec 7th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. cmd(resbiz, playerid, params[]) // Komanda za resetiranje biznisa igracu. (online stats = NE)
  2. {
  3. new string[128];
  4.  
  5. if(IsPlayerConnectedAndLoggedIn(playerid))
  6. {
  7. if(PlayerInfo[playerid][pAdmin] >= 1337) // Admin level 1337+.
  8. {
  9. if(AdminDuty[playerid] > 0)
  10. {
  11. new player;
  12. if(sscanf(params, "u", player))
  13. {
  14. SendClientMessage(playerid, COLOR_HELP, "KORISTENJE: /resbiz [ID/DioImena]");
  15. return 1;
  16. }
  17. if(IsPlayerConnectedAndLoggedIn(player))
  18. {
  19. if(player != INVALID_PLAYER_ID)
  20. {
  21.  
  22. PlayerInfo[player][pBusiness] = 999;
  23.  
  24. format(string, sizeof(string), "INFO: Uspjesno ste resetirali biznis u statistikama online igracu %s.", PlayerName[player]);
  25. SendClientMessage(playerid, COLOR_RED, string);
  26. }
  27. }
  28. else
  29. {
  30. SendClientMessage(playerid, COLOR_ERROR, "ERROR: Odabrani igrac nije online ili nije ulogiran u svoj korisnicki racun.");
  31. PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  32. }
  33. }
  34. else
  35. {
  36. SendClientMessage(playerid, COLOR_ERROR, "ERROR: Morate biti na duznosti kako bi mogli koristiti admin komande / mogucnosti.");
  37. PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  38. }
  39. }
  40. else
  41. {
  42. SendClientMessage(playerid, COLOR_ERROR, "ERROR: Niste autorizirani da koristite ovu komandu - nemate administrator level.");
  43. PlayerPlaySound(playerid, 1055, 0.0, 0.0, 0.0);
  44. }
  45. }
  46.  
  47. return 1;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement