Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.54 KB | None | 0 0
  1. //=================================ARREST=======================================
  2. if(strcmp(cmd, "/arrest", true) == 0)
  3. {
  4. if(IsPlayerConnected(playerid))
  5. {
  6. if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
  7. {
  8. if(OnDuty[playerid] == 0)
  9. {
  10. SendClientMessage(playerid, COLOR_GREY, " Du bist nicht im Dienst!");
  11. return 1;
  12. }
  13. if(IsPlayerInRangeOfPoint(playerid,8.0, 193.7325,178.9158,1003.0234))
  14. {
  15. tmp = strtok(cmdtext, idx);
  16. if(!strlen(tmp))
  17. {
  18. SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /arrest [Kaution]");
  19. return 1;
  20. }
  21. new usw;
  22. usw = strval(tmp);
  23. if(usw < 0 || usw > 1) { SendClientMessage(playerid, COLOR_GREY, " Die Möglichkeit einer Kaution kann entweder mit 0 abgelehnt-, oder mit 1 erlaubt werden !"); return 1; }
  24. new suspect = GetClosestPlayer(playerid);
  25. if(IsPlayerConnected(suspect))
  26. {
  27. if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
  28. {
  29. GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
  30. GetPlayerName(playerid, sendername, sizeof(sendername));
  31. if(WantedLevel[suspect] < 1)
  32. {
  33. SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht gesucht!");
  34. return 1;
  35. }
  36. format(string, sizeof(string), "* Du hast %s eingesperrt für $%d!", giveplayer,moneys);
  37. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  38. GivePlayerMoney(suspect, -moneys);
  39. format(string, sizeof(string), "Eingesperrt von %s ~n~ fuer $%d", sendername, moneys);
  40. GameTextForPlayer(suspect, string, 5000, 5);
  41. ResetPlayerWeapons(suspect);
  42. if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1)
  43. {
  44. format(string, sizeof(string), "<< Officer %s hat den Verdächtigen %s eingesperrt >>", sendername, giveplayer);
  45. OOCNews(COLOR_LIGHTRED, string);
  46. }
  47. else if(PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pLeader]==2)
  48. {
  49. format(string, sizeof(string), "<< Officer %s hat den Verdächtigen %s eingesperrt >>", sendername, giveplayer);
  50. OOCNews(COLOR_LIGHTRED, string);
  51. }
  52. else if(PlayerInfo[playerid][pMember]==3||PlayerInfo[playerid][pLeader]==3)
  53. {
  54. format(string, sizeof(string), "<< Soldat %s hat den Verdächtigen %s eingesperrt >>", sendername, giveplayer);
  55. OOCNews(COLOR_LIGHTRED, string);
  56. }
  57. else if(PlayerInfo[playerid][pMember]==21||PlayerInfo[playerid][pLeader]==21)
  58. {
  59. format(string, sizeof(string), "<< FBI-Agent %s hat den Verdächtigen %s eingesperrt >>", sendername, giveplayer);
  60. OOCNews(COLOR_LIGHTRED, string);
  61. }
  62. if(IsPlayerConnected(suspect))
  63. {
  64. new kosten;
  65. kosten = WantedLevel[suspect] * 2000;
  66. PlayerInfo[suspect][pJailTime] = WantedLevel[suspect] * 350;
  67. if(usw == 1)
  68. {
  69. JailPrice[suspect] = WantedLevel[suspect] * 7000;
  70. format(string, sizeof(string), "Du bist für %d Sekunden eingesperrt. Kaution: $%d", PlayerInfo[suspect][pJailTime], JailPrice[suspect]);
  71. SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
  72. GivePlayerMoney(suspect,-kosten);
  73.  
  74. }
  75. else
  76. {
  77. JailPrice[suspect] = 0;
  78. format(string, sizeof(string), "Du bist für %d Sekunden eingesperrt. Kaution: nicht möglich", PlayerInfo[suspect][pJailTime]);
  79. SendClientMessage(suspect, COLOR_LIGHTBLUE, string);
  80. GivePlayerMoney(suspect,-kosten);
  81. }
  82. PlayerInfo[suspect][pJailed] = 1;
  83. PlayerInfo[suspect][pArrested] += 1;
  84. SetPlayerInterior(suspect, 3);
  85. SetPlayerPos(suspect,198.0667,174.7601,1003.0234);
  86. SetPlayerFree(suspect,playerid, "Verhaftet");
  87. WantedPoints[suspect] = 0;
  88. WantedLevel[suspect] = 0;
  89. SetPlayerWantedLevel(suspect,0);
  90. }
  91. }
  92. else
  93. {
  94. SendClientMessage(playerid, COLOR_GREY, " Niemand zum Verhaften in deiner Nähe.");
  95. return 1;
  96. }
  97. }
  98. }
  99. }
  100. else
  101. {
  102. SendClientMessage(playerid, COLOR_GREY, " Du bist kein Beamter !");
  103. return 1;
  104. }
  105. }
  106. return 1;
  107. }
  108. //===============================SUSPECT========================================
  109. if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
  110. {
  111. if(IsPlayerConnected(playerid))
  112. {
  113.  
  114. new x_job[128];
  115. if(OnDuty[playerid]==0)
  116. {
  117. SendClientMessage(playerid, COLOR_GREY, "Du bist kein Beamter!");
  118. return 1;
  119. }
  120. tmp = strtok(cmdtext, idx);
  121. if(!strlen(tmp))
  122. {
  123. SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: (/su)spect [Playerid] [kürzel]");
  124. return 1;
  125. }
  126. x_job = strtok(cmdtext, idx);
  127. if(!strlen(x_job ))
  128. {
  129. SendClientMessage(playerid, COLOR_GRAD1, " /suspect [Playerid/Name] [kürzel]");
  130. return 1;
  131. }
  132. new turnmes[128];
  133. new turned[MAX_PLAYER_NAME];
  134. GetPlayerName(playerid, turned, sizeof(turned));
  135. new points = WantedPoints[playerid];
  136. giveplayerid = ReturnUser(tmp);
  137. tmp = strtok(cmdtext, idx);
  138. if (gTeam[playerid] == 2 || IsACop(playerid))
  139. {
  140. if(IsPlayerConnected(giveplayerid))
  141. {
  142. if(giveplayerid != INVALID_PLAYER_ID)
  143. {
  144. for(new i = 0; i <MAX_PLAYERS; i++)
  145. {
  146. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  147. GetPlayerName(playerid, sendername, sizeof(sendername));
  148. if(WantedLevel[giveplayerid] >= 6)
  149. {
  150. SendClientMessage(playerid,COLOR_GRAD2,"Der Spieler hat schon 6 Wanteds");
  151. return 1;
  152. }
  153. else if(strcmp(x_job,"drive",true) == 0)
  154. {
  155. format(turnmes,sizeof(turnmes), "Officer %s hat dich des Falschfahrens überführt!", sendername);
  156. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, turnmes);
  157. SetPlayerWantedLevel(giveplayerid,points+1);
  158. WantedPoints[giveplayerid] += 1;
  159. WantedLevel[giveplayerid]+=1;
  160. format(turnmes, sizeof(turnmes), "%s hat %s des Falschfahrens überführt!",sendername,giveplayer);
  161. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  162. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  163. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  164. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  165. }
  166. else if(strcmp(x_job,"flucht",true) == 0)
  167. {
  168. format(string,sizeof(string), "Officer %s hat dich der Flucht überführt!", sendername);
  169. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  170. SetPlayerWantedLevel(giveplayerid,points+2);
  171. WantedPoints[giveplayerid] += 2;
  172. WantedLevel[giveplayerid]+=2;
  173. format(turnmes, sizeof(turnmes), "%s hat %s der Flucht überführt!",sendername,giveplayer);
  174. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  175. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  176. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  177. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  178. }
  179. else if(strcmp(x_job,"attack",true) == 0)
  180. {
  181. format(string,sizeof(string), "Officer %s hat dich des Angriffes überführt!", sendername);
  182. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  183. SetPlayerWantedLevel(giveplayerid,points+1);
  184. WantedPoints[giveplayerid] += 1;
  185. WantedLevel[giveplayerid]+=1;
  186. format(turnmes, sizeof(turnmes), "%s hat %s des Angriffes überführt!",sendername,giveplayer);
  187. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  188. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  189. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  190. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  191. }
  192. else if(strcmp(x_job,"kill",true) == 0)
  193. {
  194. format(string,sizeof(string), "Officer %s hat dich des Mordes überführt!", sendername);
  195. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  196. SetPlayerWantedLevel(giveplayerid,points+2);
  197. WantedPoints[giveplayerid] += 2;
  198. WantedLevel[giveplayerid]+=2;
  199. format(turnmes, sizeof(turnmes), "%s hat %s des Mordes überführt!",sendername,giveplayer);
  200. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  201. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  202. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  203. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  204. }
  205. else if(strcmp(x_job,"insult",true) == 0)
  206. {
  207. format(string,sizeof(string), "Officer %s hat dich der Beleidigung überführt!", sendername);
  208. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  209. SetPlayerWantedLevel(giveplayerid,points+1);
  210. WantedPoints[giveplayerid] += 1;
  211. WantedLevel[giveplayerid]+=1;
  212. format(turnmes, sizeof(turnmes), "%s hat %s der Beleidigung überführt!",sendername,giveplayer);
  213. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  214. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  215. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  216. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  217. }
  218. else if(strcmp(x_job,"damage",true) == 0)
  219. {
  220. format(string,sizeof(string), "Officer %s hat dich der Beschädigung eines Fahrzeuges überführt!", sendername);
  221. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  222. SetPlayerWantedLevel(giveplayerid,points+1);
  223. WantedLevel[giveplayerid]+=1;
  224. WantedPoints[giveplayerid] += 1;
  225. format(turnmes, sizeof(turnmes), "%s hat %s der Beschädigung eines Fahrzeuges überführt!",sendername,giveplayer);
  226. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  227. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  228. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  229. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  230.  
  231. }
  232. else if(strcmp(x_job,"decar",true) == 0)
  233. {
  234. format(string,sizeof(string), "Officer %s hat dich der Zerstörung eines Fahrzeuges überführt!", sendername);
  235. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  236. SetPlayerWantedLevel(giveplayerid,points+2);
  237. WantedLevel[giveplayerid]+=2;
  238. WantedPoints[giveplayerid] += 2;
  239. format(turnmes, sizeof(turnmes), "%s hat %s der Zerstörung eines Fahrzeuges überführt!",sendername,giveplayer);
  240. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  241. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  242. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  243. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  244.  
  245. }
  246. else if(strcmp(x_job,"car",true) == 0)
  247. {
  248. format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
  249. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  250. SetPlayerWantedLevel(giveplayerid,points+1);
  251. WantedLevel[giveplayerid]+=1;
  252. WantedPoints[giveplayerid] += 1;
  253. format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
  254. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  255. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  256. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  257. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  258.  
  259. }
  260. else if(strcmp(x_job,"bike",true) == 0)
  261. {
  262. format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
  263. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  264. SetPlayerWantedLevel(giveplayerid,points+1);
  265. WantedLevel[giveplayerid]+=1;
  266. WantedPoints[giveplayerid] += 1;
  267. format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
  268. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  269. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  270. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  271. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  272.  
  273. }
  274. else if(strcmp(x_job,"lkw",true) == 0)
  275. {
  276. format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
  277. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  278. SetPlayerWantedLevel(giveplayerid,points+1);
  279. WantedLevel[giveplayerid]+=1;
  280. WantedPoints[giveplayerid] += 1;
  281. format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
  282. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  283. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  284. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  285. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  286. }
  287. else if(strcmp(x_job,"fly",true) == 0)
  288. {
  289. format(string,sizeof(string), "Officer %s hat dich des fliegens ohne Flugschein überführt!", sendername);
  290. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  291. SetPlayerWantedLevel(giveplayerid,points+1);
  292. WantedPoints[giveplayerid] += 1;
  293. WantedLevel[giveplayerid]+=1;
  294. format(turnmes, sizeof(turnmes), "%s hat %s des fliegens ohne Flugschein überführt!",sendername,giveplayer);
  295. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  296. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  297. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  298. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  299. }
  300. else if(strcmp(x_job,"govres",true) == 0)
  301. {
  302. format(string,sizeof(string), "Officer %s hat dich des Wiederstand gegen die Staatsgewalt überführt!", sendername);
  303. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  304. SetPlayerWantedLevel(giveplayerid,points+1);
  305. WantedPoints[giveplayerid] += 1;
  306. WantedLevel[giveplayerid]+=1;
  307. format(turnmes, sizeof(turnmes), "%s hat %s des Wiederstand gegen die Staatsgewalt überführt!",sendername,giveplayer);
  308. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  309. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  310. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  311. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  312. }
  313. else if(strcmp(x_job,"govobs",true) == 0)
  314. {
  315. format(string,sizeof(string), "Officer %s hat dich der Behinderung der Staatsgewalt überführt!", sendername);
  316. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  317. SetPlayerWantedLevel(giveplayerid,points+1);
  318. WantedLevel[giveplayerid]+=1;
  319. WantedPoints[giveplayerid] += 1;
  320. format(turnmes, sizeof(turnmes), "%s hat %s der Behinderung der Staatsgewalt überführt!",sendername,giveplayer);
  321. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  322. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  323. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  324. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  325. }
  326. else if(strcmp(x_job,"drugs",true) == 0)
  327. {
  328. format(string,sizeof(string), "Officer %s hat dich unter Drogen einfluss überführt!", sendername);
  329. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  330. SetPlayerWantedLevel(giveplayerid,points+1);
  331. WantedLevel[giveplayerid]+=1;
  332. WantedPoints[giveplayerid] += 1;
  333. format(turnmes, sizeof(turnmes), "%s hat %s unter Drogen einfluss überführt!",sendername,giveplayer);
  334. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  335. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  336. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  337. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  338. }
  339. else if(strcmp(x_job,"alc",true) == 0)
  340. {
  341. format(string,sizeof(string), "Officer %s hat dich beim fahren unter Alkohol einfluss überführt!", sendername);
  342. SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
  343. SetPlayerWantedLevel(giveplayerid,points+1);
  344. WantedPoints[giveplayerid] += 1;
  345. WantedLevel[giveplayerid]+=1;
  346. format(turnmes, sizeof(turnmes), "%s hat %s beim fahren unter Alkohol einfluss überführt!",sendername,giveplayer);
  347. SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
  348. SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
  349. SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
  350. SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
  351. }
  352. return 1;
  353. }
  354. }
  355. }
  356. else
  357. {
  358. format(string, sizeof(string), "%d ist kein aktiver Spieler.", giveplayerid);
  359. SendClientMessage(playerid, COLOR_GRAD1, string);
  360. return 1;
  361. }
  362. }
  363. else
  364. {
  365. SendClientMessage(playerid, COLOR_GRAD2, "Du bist kein Beamter!");
  366. }
  367.  
  368. }
  369. return 1;
  370. }
  371.  
  372. forward SendRadioMessage(member,color,string[]);
  373. public SendRadioMessage(member, color, string[])
  374. {
  375. for(new i = 0; i <MAX_PLAYERS; i++)
  376. {
  377. if(IsPlayerConnected(i))
  378. {
  379. if(OnDuty[i] == 1)
  380. {
  381. if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
  382. {
  383. SendClientMessage(i, color, string);
  384. }
  385. }
  386. }
  387. }
  388. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement