Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. CMD:bega(playerid,params[])
  2. {
  3. if(IsJobFromLaw(PlayerDB[playerid][Job]))
  4. {
  5. new id;
  6. if(sscanf(params, "u", id))
  7. {
  8. UsageMessage(playerid,"* Pranešti žaidėjui, kad jis gaudomas policijos: /bega [V_P/ID]");
  9. }
  10. else
  11. {
  12. if(IsPlayerConnected(id))
  13. {
  14. if(id == playerid)
  15. {
  16. ErrorMsg(playerid,"* Šios komandos negalite naudoti ant savęs.");
  17. return 1;
  18. }
  19. if(PlayerDB[id][BEGA] == 1)
  20. {
  21. SetPlayerColor(id, GREY);
  22. new string[128];
  23. format(string, 128, "[Teisėsaugos racija] %s: atšaukiau %s gaudymą.",Vardas(playerid),Vardas(id));
  24. SendClientMessageToLaw(0xDFE009FF, string);
  25. PlayerDB[id][BEGA] = 0;
  26. PlayerDB[id][BegaLaiko] = 0;
  27. format(string, 128, "* [POLICIJA]: Jūsų gaudymas atšauktas policininko %s.", Vardas(playerid));
  28. SendClientMessage(id, ZALIA, string);
  29. }
  30. else
  31. {
  32. GameTextForPlayer(playerid,"~r~~h~ * [POLICIJA] jūs esate gaudomas,prašome tučtojau pasiduoti.",500,4);
  33. SetPlayerColor(id, BALTA);
  34. PlayerDB[id][BEGA] = 1;
  35. PlayerDB[id][BegaLaiko] = 0;
  36. format(PlayerDB[id][BegaUzdejesPareigunas],24,"%s",Vardas(playerid));
  37. new string[144];
  38. format(string, 144, "[TEISĖSAUGA] Pareigūnas %s: pastebėjau, kaip %s bėga nuo policijos, jis pažymėtas žemėlapyje raudonu tašku",Vardas(playerid),Vardas(id));
  39. new Float:Cords[3];
  40. GetPlayerPos(id, Cords[0], Cords[1], Cords[2]);
  41. foreach(new i : Player)
  42. {
  43. if(IsJobFromLaw(PlayerDB[i][Job]))
  44. {
  45. SendClientMessage(i, 0xDFE009FF, string);
  46. SetPlayerCheckpoint(i, Cords[0], Cords[1], Cords[2], 1.5);
  47. SetPlayerMapIcon(i, 90, Cords[0], Cords[1], Cords[2], 41, -1, MAPICON_GLOBAL);
  48.  
  49. }
  50. }
  51. }
  52. }
  53. else
  54. {
  55. ErrorMsg(playerid,"Tokio žaidėjo nėra.");
  56. }
  57. }
  58. }
  59. else
  60. {
  61. ErrorMsg(playerid,"* Ši komanda tik teisėsaugai.");
  62. }
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement