Advertisement
ShomyScript

Untitled

Sep 29th, 2017
691
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. /*
  2. FILTERSCRIPT
  3. Wanted Level
  4. Shomy
  5. */
  6. #include < a_samp >
  7. #include < zcmd >
  8. #include < sscanf2 >
  9. #include < foreach >
  10. #define COL_SERVER "{FF8000}"
  11. #define BELA "{FFFFFF}"
  12. #define SCM SendClientMessage
  13. #define CRVENA 0xAA3333AA
  14. new WL[MAX_PLAYERS];
  15. new Policajac[MAX_PLAYERS];
  16.  
  17. forward DEPchat(color, string[]);
  18. public DEPchat(color, string[])
  19. {
  20. foreach(Player,i)
  21. {
  22. if(Policajac[i] == 1)
  23. {
  24. SCM(i, color, string);
  25. printf("%s", string);
  26. }
  27. }
  28. }
  29. stock GetName(playerid)
  30. {
  31. new name[MAX_PLAYER_NAME];
  32. GetPlayerName(playerid, name, sizeof(name));
  33. return name;
  34. }
  35. CMD:su(playerid, params[])
  36. {
  37. new id, wlevel, msg[128], msg1[128], razlog;
  38. if(Policajac[playerid] == 1)
  39. {
  40. if(sscanf(params, "uds[80]", id, wlevel, razlog)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Koristite /su [ID] [Wanted Level 1-7] [Razlog]");
  41. if(wlevel > 7 || wlevel < 1) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Wanted Level ne moze biti veci od 7 ili manji od 1 !");
  42. if(!IsPlayerConnected(id)) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac nije na serveru !");
  43. if(id == playerid) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Ne mozete dati Wanted Level samom sebi !");
  44. if(Policajac[id] == 1) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac je policajac !");
  45. if(WL[id] > 6) return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Taj igrac vec ima WL 7 !");
  46. else
  47. {
  48. WL[id] = wlevel;
  49. format(msg,sizeof(msg), ""COL_SERVER"[ Wanted Level ] "BELA"Policajac %s je dao Wanted Level %d igracu %s. Razlog %s.", GetName(playerid), wlevel, GetName(id), razlog);
  50. DEPchat(-1, msg);
  51. format(msg1,sizeof(msg1), ""COL_SERVER"[ Wanted Level ] "BELA"Policajac %s Vam je dao Wanted Level %d. Razlog %s.",GetName(playerid), wlevel, razlog);
  52. SCM(id, -1, msg1);
  53. SetPlayerColor(id, CRVENA);
  54. }
  55. }
  56. else return SCM(playerid, -1, ""COL_SERVER"[SERVER] "BELA"Niste ovlasceni !");
  57. return 1;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement