Advertisement
Guest User

Untitled

a guest
May 28th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.61 KB | None | 0 0
  1. CMD:su(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(SomatePermission[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "{3385FF}Wait 5 seconds to use again /so.");
  9. {
  10. new id,string[256];
  11. if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/su <Name/Playerid>");
  12. {
  13. if (!ProxDetectorS(40.0, playerid, id)) return SendClientMessage(playerid, COLOR_WHITE, "Acel player este prea departe de tine.");
  14. if(id != INVALID_PLAYER_ID)
  15. {
  16. new sendername[25],numelee[25];
  17. GetPlayerName(id,numelee,sizeof(numelee));
  18. GetPlayerName(playerid,sendername,sizeof(sendername));
  19. if (GetPlayerState(id) == 2)
  20. {
  21. new speed = Carspeed(id);
  22. if(speed > 1)
  23. {
  24. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Trage pe dreapta imediat!", sendername, numelee);
  25. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  26. timersoo[playerid] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
  27. somatee[playerid] = 0;
  28. SomatePermission[playerid] = 0;
  29. somated[id] = playerid;
  30. format(somatename[id], 30, sendername);
  31. soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
  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] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
  40. somatee[playerid] = 0;
  41. SomatePermission[playerid] = 0;
  42. somated[id] = playerid;
  43. format(somatename[id], 30, sendername);
  44. soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
  45. }
  46. else if(PlayerInfo[id][pWantedLevel] > 0)
  47. {
  48. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Te predai?", sendername, numelee);
  49. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  50. timersoo[playerid] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
  51. somatee[playerid] = 0;
  52. SomatePermission[playerid] = 0;
  53. somated[id] = playerid;
  54. format(somatename[id], 30, sendername);
  55. soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
  56. }
  57. }
  58. }
  59. else
  60. {
  61. if(PlayerInfo[id][pWantedLevel] > 0)
  62. {
  63. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Te predai?", sendername, numelee);
  64. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  65. timersoo[playerid] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
  66. somatee[playerid] = 0;
  67. SomatePermission[playerid] = 0;
  68. somated[id] = playerid;
  69. format(somatename[id], 30, sendername);
  70. soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
  71. }
  72. else if(PlayerInfo[id][pWantedLevel] == 0)
  73. {
  74. format(string, sizeof(string), "{FFFF00}(megaphone) Politist %s: {1560BD}%s{FFFF00}, esti urmarit de politie! Opreste-te unde esti!", sendername, numelee);
  75. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  76. timersoo[playerid] = SetTimerEx("SetSomate", 5000, 1, "i", playerid);
  77. somatee[playerid] = 0;
  78. SomatePermission[playerid] = 0;
  79. somated[id] = playerid;
  80. format(somatename[id], 30, sendername);
  81. soexpire[playerid] = SetTimerEx("SomateExpire", 180000, 0, "i", id);
  82. }
  83. }
  84. }
  85. else return SendClientMessage(playerid, COLOR_WHITE, "Player not connected.");
  86. }
  87. }
  88. }
  89. else return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a cop.");
  90. }
  91. return 1;
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement