Score_

Untitled

Jul 19th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | None | 0 0
  1. CMD:so(playerid, params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(IsACop(playerid))
  7. {
  8. if(timersoo[playerid] > 0) return SendClientMessage(playerid, COLOR_WHITE,"You need to wait 5 seconds before use /so again.");
  9. {
  10. new id,string[256];
  11. if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "{AB0000}Usage: {FFFFFF}/so [name/playerid]");
  12. {
  13. if(IsACop(id)) return SendClientMessage(playerid, COLOR_GREY, "You can't somate a cop.");
  14. if (!ProxDetectorS(20.0, playerid, id)) return SendClientMessage(playerid, COLOR_WHITE,"Acel player este prea departe de tine.");
  15. if(id != INVALID_PLAYER_ID)
  16. {
  17. new sendername[25],numelee[25];
  18. GetPlayerName(id,numelee,sizeof(numelee));
  19. GetPlayerName(playerid,sendername,sizeof(sendername));
  20. if (GetPlayerState(id) == 2)
  21. {
  22. new speed = Carspeed(id);
  23. if(speed > 1)
  24. {
  25. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Trage pe dreapta imediat!", sendername, numelee);
  26. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  27. timersoo[playerid] = 5;
  28. somatee[playerid] = 0;
  29. somated[id] = playerid;
  30. format(somatename[id], 30, sendername);
  31. soexpire[id] = 180;
  32. }
  33. else if(speed == 0)
  34. {
  35. if(PlayerInfo[id][pWantedLevel] == 0)
  36. {
  37. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Ramai pe loc!", sendername, numelee);
  38. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  39. timersoo[playerid] = 5;
  40. somatee[playerid] = 0;
  41. somated[id] = playerid;
  42. format(somatename[id], 30, sendername);
  43. soexpire[id] = 180;
  44. }
  45. else if(PlayerInfo[id][pWantedLevel] > 0)
  46. {
  47. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Te predai?", sendername, numelee);
  48. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  49. timersoo[playerid] = 5;
  50. somatee[playerid] = 0;
  51. somated[id] = playerid;
  52. format(somatename[id], 30, sendername);
  53. soexpire[id] = 180;
  54. }
  55. }
  56. }
  57. else
  58. {
  59. if(PlayerInfo[id][pWantedLevel] > 0)
  60. {
  61. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Te predai?", sendername, numelee);
  62. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  63. timersoo[playerid] = 5;
  64. somatee[playerid] = 0;
  65. somated[id] = playerid;
  66. format(somatename[id], 30, sendername);
  67. soexpire[id] = 180;
  68. }
  69. else if(PlayerInfo[id][pWantedLevel] == 0)
  70. {
  71. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Opreste-te unde esti!", sendername, numelee);
  72. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  73. timersoo[playerid] = 5;
  74. somatee[playerid] = 0;
  75. somated[id] = playerid;
  76. format(somatename[id], 30, sendername);
  77. soexpire[id] = 180;
  78. }
  79. }
  80. }
  81. else return SendClientMessage(playerid, COLOR_WHITE,"Player not connected.");
  82. }
  83. }
  84. }
  85. else return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a cop.");
  86. }
  87. return 1;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment