Guest User

Untitled

a guest
Mar 16th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.18 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. new string[256];
  4. new name[MAX_PLAYER_NAME];
  5. new name2[MAX_PLAYER_NAME];
  6. new deathreason[20];
  7. new y, m, d;
  8. new h,mi,s;
  9. getdate(y,m,d);
  10. gettime(h,mi,s);
  11. GetPlayerName(playerid, name, sizeof(name));
  12. GetPlayerName(killerid, name2, sizeof(name2));
  13. PlayerInfo[playerid][pHealth] = 100.0;
  14. Mrtav[playerid] = 1;
  15. RealAmmo[playerid] = 0;
  16. PlayerMaxAmmo[playerid] = 1;
  17. PreTazerAmmo[playerid] = 0;
  18. DisarmInv(playerid);
  19. SafeResetPlayerWeapons(playerid);
  20. KillTimer(stopactimer[playerid]);
  21. stopactimer[playerid] = SetTimerEx("resumeanticheat", 10000, false, "i", playerid);
  22. MedicBill[playerid] = 1;
  23. OnMission[playerid] = 0;
  24. PlayerInfo[playerid][pCuffed] = 0;
  25. PlayerCuffed[playerid] = 0;
  26. DisarmInv(playerid);
  27. if(Vucen[playerid] != 9999)
  28. {
  29. KillTimer(VuciTimer[Vucen[playerid]]);
  30. IDVucenogIgraca[Vucen[playerid]] = 9999;
  31. Vucen[playerid] = 9999;
  32. }
  33. if(IDVucenogIgraca[playerid] != 9999)
  34. {
  35. KillTimer(VuciTimer[playerid]);
  36. IDVucenogIgraca[playerid] = 9999;
  37. Vucen[IDVucenogIgraca[playerid]] = 9999;
  38. }
  39. if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  40. {
  41. if(AntiDriveBy == 1)
  42. {
  43. new model = GetVehicleModel(GetPlayerVehicleID(killerid));
  44. if(model != 520 || model != 425 || model != 432)
  45. {
  46. PlayerInfo[killerid][pWarns] ++;
  47. if(PlayerInfo[playerid][pWarns] == 3)
  48. {
  49. format(string, sizeof(string), "%s (%d), kikovan od strane AntiCheata zbog DriveBy ubistva.", name2, killerid);
  50. SendClientMessageToAll(COLOR_NICERED, string);
  51. SCM(killerid,COLOR_ORANGE, "Kikovani ste od strane AntiCheata zbog DriveBy ubistva.");
  52. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Excessive Drive By Killing",d,m,y,h,mi,s,name2);
  53. KickLog(string);
  54. Kick(killerid);
  55. }
  56. else
  57. {
  58. format(string, sizeof(string), "%s (%d), upozoren od strane AntiCheata zbog DriveBy ubistva..", name2, killerid);
  59. SendClientMessageToAll(COLOR_NICERED, string);
  60. SCM(killerid,COLOR_ORANGE, "Upozoreni ste od strane AntiCheata zbog DriveBy ubistva.");
  61. format(string, sizeof(string), "[AntiCheat]: %s je uradio DB, upozoren je od strane AntiCheata.", name2);
  62. SendAdminMessage(COLOR_YELLOW, string);
  63. format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Warned by Anticheat - Reason: Driver drive-by kill.",d,m,y,h,mi,s);
  64. AddPunishment(killerid, string);
  65. }
  66. }
  67. }
  68. }
  69. ubioIgraca[killerid] = playerid;
  70. ShowPlayerDialog(killerid, DIALOG_RAZLOG_K, DIALOG_STYLE_INPUT, "Razlog Ubistva", "{00C0FF}Molimo vas upišite razlog zbog kojeg ste ubili {FFFFFF}igraca.\n{00C0FF}Zapamtite:Ako razlog ne bude u dobrom formatu dobicete{FFFFFF}kaznu ", "U redu", "Odustani");
  71.  
  72.  
  73.  
  74. if(killerid != INVALID_PLAYER_ID)
  75. {
  76. if(reason == 0) { deathreason = "Rukama"; }
  77. else if(reason == 36 || reason == 35 || reason == 40 || reason == 16) { deathreason = "Explosion"; }
  78. else if(reason == 18 || reason == 37) { deathreason = "Fire"; }
  79. else if(reason == 51) { deathreason = "Explosion"; }
  80. else if(reason == 50) { deathreason = "Heli-Kill"; }
  81. else { GetWeaponName(reason, deathreason, sizeof(deathreason)); }
  82. format(string, sizeof(string),"[INFO]: %s (%d) has been killed by %s (%d) - %s", name,playerid,name2,killerid,deathreason);
  83. SendAdminMessage(COLOR_GREEN, string);
  84. }
  85. else
  86. {
  87. new text[30];
  88. if(reason == 51) { text = "Explosion"; }
  89. else if(reason == 53) { text = "Drowned"; }
  90. else if(reason == 54) { text = "Collision"; }
  91. else { text = "Death"; }
  92. format(string, sizeof(string),"[INFO]: %s (%d) ubijen od strane servera. (%s)",name,playerid, text);
  93. SendAdminMessage(COLOR_GREEN, string);
  94. }
  95. new playercash;
  96. new victimteam = gTeam[playerid];
  97. new Float:px,Float:py,Float:pz;
  98. new killerteam = gTeam[killerid];
  99. gPlayerSpawned[playerid] = 0;
  100.  
  101. if(Decoding[playerid] == 1)
  102. {
  103. Decoding[playerid] = 0;
  104. KillTimer(DecoderTimer);
  105. HideDecoder(playerid);
  106. SCM(playerid, COLOR_NICERED, "Izasli ste iz vozila, dekodiranje je stopirano!");
  107. decodecode = 0;
  108. Decoder = 0;
  109. }
  110. if(IsInBus[playerid] == 1)
  111. {
  112. IsInBus[playerid] = 0;
  113. KillTimer(Timer1[playerid]);
  114. KillTimer(Timer2[playerid]);
  115. }
  116. if(PlayerInfo[playerid][pAdminDuty] >= 1) { PlayerInfo[playerid][pAdminDuty] = 0; }
  117. GetPlayerPos(playerid, px, py, pz);
  118.  
  119. if(PlayerInfo[killerid][pMedalja9] == 0 && PlayerInfo[killerid][pKills] == 1)
  120. {
  121. TextDrawSetString(Textdraw64[killerid],"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Newbie Killer (9) ~n~~n~~w~osvojili ste ~g~$100");
  122. ShowMedalja(killerid);
  123. SafeGivePlayerMoney(killerid,100);
  124. PlayerInfo[killerid][pMedalja9] = 1;
  125. }
  126. if(PlayerInfo[killerid][pMedalja10] == 0 && PlayerInfo[killerid][pKills] == 75)
  127. {
  128. TextDrawSetString(Textdraw64[killerid],"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Serial Killer (10) ~n~~n~~w~osvojili ste ~g~$250");
  129. ShowMedalja(killerid);
  130. SafeGivePlayerMoney(killerid,250);
  131. PlayerInfo[killerid][pMedalja10] = 1;
  132. }
  133. if(PlayerInfo[killerid][pMedalja11] == 0 && PlayerInfo[killerid][pKills] == 150)
  134. {
  135. TextDrawSetString(Textdraw64[killerid],"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Assasin (11) ~n~~n~~w~osvojili ste ~g~$500");
  136. ShowMedalja(killerid);
  137. SafeGivePlayerMoney(killerid,500);
  138. PlayerInfo[killerid][pMedalja11] = 1;
  139. }
  140. if(gPlayerUsingLoopingAnim[playerid])
  141. {
  142. gPlayerUsingLoopingAnim[playerid] = 0;
  143. TextDrawHideForPlayer(playerid,txtAnimHelper);
  144. }
  145. if(WantedPoints[playerid] > 0)
  146. {
  147. new dstring[128];
  148. new wanted = WantedPoints[playerid];
  149. new diecash = 0;
  150. while(WantedPoints[playerid] > 0)
  151. {
  152. diecash += 500;
  153. WantedPoints[playerid] --;
  154. }
  155. format(dstring, sizeof(dstring), "Izgubili ste $%d zato sto ste umrli sa %d Wanted Poena.", diecash, wanted);
  156. SCM(playerid, COLOR_YELLOW, dstring);
  157. SafeGivePlayerMoney(playerid, - diecash);
  158. PlayerInfo[playerid][pWantedDeaths] += 1;
  159. }
  160. if(PlayerInfo[playerid][pRegularRank] > 0) { SafeSetPlayerHealth(playerid, 100.0); }
  161. else { SafeSetPlayerHealth(playerid, 50.0); }
  162. gPlayerSpawned[playerid] = 1;
  163. SafeTime[playerid] = 60;
  164. Checked[playerid] = 1;
  165. PlayerGotSpottedRecently[playerid] = 1;
  166. SetTimerEx("ResetAcWarn",20000,false, "i", playerid);
  167. if(killerid != 255)
  168. {
  169. if(GetPlayerState(killerid) == 2)
  170. {
  171. if(ProxDetectorS(20, killerid, playerid))
  172. {
  173. if(!IsPlayerInAnyVehicle(playerid))
  174. {
  175. if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
  176. {
  177. SCM(killerid, COLOR_YELLOW, "To je bilo drive-by ubistvo. Ne zloupotrevljavajte to.");
  178. return 1;
  179. }
  180. SetPlayerCriminalEx(killerid,255,"Manslaughter");
  181. return 1;
  182. }
  183. }
  184. }
  185. }
  186. if(reason == 22)
  187. {
  188. if(PlayerInfo[killerid][pPistSkill] >= 0 && PlayerInfo[killerid][pPistSkill] <= 1000)
  189. {
  190. PlayerInfo[killerid][pPistSkill] += 2;
  191. SetPlayerSkills(killerid);
  192. }
  193. }
  194. if(reason == 23)
  195. {
  196. if(PlayerInfo[killerid][pSilenSkill] >= 0 && PlayerInfo[killerid][pSilenSkill] <= 1000)
  197. {
  198. PlayerInfo[killerid][pSilenSkill] += 2;
  199. SetPlayerSkills(killerid);
  200. }
  201. if(PlayerInfo[killerid][pMedalja0] == 0)
  202. {
  203. TextDrawSetString(Textdraw64[killerid],"Cestitamo! ~n~~n~Osvojili ste novu medalju ~n~~b~Silent Kill (0) ~n~~n~~w~osvojili ste ~g~$200 ~w~and ~p~50+ of ~y~Silenced Pistol Skill");
  204. ShowMedalja(killerid);
  205. PlayerInfo[killerid][pSilenSkill] += 50;
  206. SafeGivePlayerMoney(killerid,200);
  207. PlayerInfo[killerid][pMedalja0] = 1;
  208. }
  209. }
  210. if(reason == 24)
  211. {
  212. if(PlayerInfo[killerid][pDesertSkill] >= 0 && PlayerInfo[killerid][pDesertSkill] <= 1000)
  213. {
  214. PlayerInfo[killerid][pDesertSkill] += 2;
  215. SetPlayerSkills(killerid);
  216. }
  217. }
  218. if(reason == 25)
  219. {
  220. if(PlayerInfo[killerid][pShotgSkill] >= 0 && PlayerInfo[killerid][pShotgSkill] <= 1000)
  221. {
  222. PlayerInfo[killerid][pShotgSkill] += 2;
  223. SetPlayerSkills(killerid);
  224. }
  225. }
  226. if(reason == 26)
  227. {
  228. if(PlayerInfo[killerid][pSawnSkill] >= 0 && PlayerInfo[killerid][pSawnSkill] <= 800)
  229. {
  230. PlayerInfo[killerid][pSawnSkill] += 2;
  231. SetPlayerSkills(killerid);
  232. }
  233. }
  234. if(reason == 27)
  235. {
  236. if(PlayerInfo[killerid][pCombSkill] >= 0 && PlayerInfo[killerid][pCombSkill] <= 1000)
  237. {
  238. PlayerInfo[killerid][pCombSkill] += 2;
  239. SetPlayerSkills(killerid);
  240. }
  241. }
  242.  
  243. if(reason == 28 || reason == 32)
  244. {
  245. if(PlayerInfo[killerid][pUziSkill] >= 0 && PlayerInfo[killerid][pUziSkill] <= 800)
  246. {
  247. PlayerInfo[killerid][pUziSkill] += 2;
  248. SetPlayerSkills(killerid);
  249. }
  250. }
  251.  
  252. if(reason == 29)
  253. {
  254. if(PlayerInfo[killerid][pSmgSkill] >= 0 && PlayerInfo[killerid][pSmgSkill] <= 1000)
  255. {
  256. PlayerInfo[killerid][pSmgSkill] += 2;
  257. SetPlayerSkills(killerid);
  258. }
  259. }
  260.  
  261. if(reason == 30)
  262. {
  263. if(PlayerInfo[killerid][pAkSkill] >= 0 && PlayerInfo[killerid][pAkSkill] <= 1000)
  264. {
  265. PlayerInfo[killerid][pAkSkill] += 2;
  266. SetPlayerSkills(killerid);
  267. }
  268. }
  269.  
  270. if(reason == 31)
  271. {
  272. if(PlayerInfo[killerid][pM4Skill] >= 0 && PlayerInfo[killerid][pM4Skill] <= 1000)
  273. {
  274. PlayerInfo[killerid][pM4Skill] += 2;
  275. SetPlayerSkills(killerid);
  276. }
  277. }
  278.  
  279.  
  280. if(gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
  281. {
  282. DisablePlayerCheckpoint(playerid);
  283. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  284. }
  285. new caller = Mobile[playerid];
  286. if(caller != 255)
  287. {
  288. if(caller < 255)
  289. {
  290. SCM(caller, COLOR_GRAD2, "** Veza se prekinula....");
  291. CellTime[caller] = 0;
  292. CellTime[playerid] = 0;
  293. Mobile[caller] = 255;
  294. }
  295. Mobile[playerid] = 255;
  296. CellTime[playerid] = 0;
  297. }
  298. ClearCrime(playerid);
  299. if(GettingCK[playerid] < 999)
  300. {
  301. if(IsPlayerConnected(killerid))
  302. {
  303. if(OnCK[killerid] < 999)
  304. {
  305. new killer[MAX_PLAYER_NAME];
  306. new dier[MAX_PLAYER_NAME];
  307. GetPlayerName(playerid, dier, sizeof(dier));
  308. GetPlayerName(killerid, killer, sizeof(killer));
  309. format(string, sizeof(string), "* %s has performed a Character Kill on you, you aren't able to play with this Character anymore.",killer);
  310. SCM(playerid, COLOR_LIGHTRED, string);
  311. format(string, sizeof(string), "** %s has Character Killed %s **",killer,dier);
  312. CKLog(string);
  313. BroadCast(COLOR_LIGHTRED, string);
  314. PlayerInfo[playerid][pCK] = 1;
  315. if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
  316. else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
  317. if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
  318. else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
  319. KickPlayer[playerid] = 1;
  320. }
  321. }
  322. }
  323. if(PlayerInfo[playerid][pHeadValue] > 0)
  324. {
  325. if(IsPlayerConnected(killerid))
  326. {
  327. if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
  328. {
  329. if(GoChase[killerid] == playerid)
  330. {
  331. //ConsumingMoney[killerid] = 1;
  332. new killer[MAX_PLAYER_NAME];
  333. GetPlayerName(killerid, killer, sizeof(killer));
  334. SafeGivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
  335. format(string,128,"<< Hitman %s je ispunio ugovor i ubio %s Zarada: $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
  336. SendFamilyMessage(8, COLOR_YELLOW, string);
  337. PlayerInfo[playerid][pHeadValue] = 0;
  338. GotHit[playerid] = 0;
  339. GetChased[playerid] = 999;
  340. GoChase[killerid] = 999;
  341. }
  342. }
  343. }
  344. }
  345. if(victimteam >= 4)
  346. {
  347. if(IsPlayerConnected(killerid))
  348. {
  349. //new killer[MAX_PLAYER_NAME];
  350. //GetPlayerName(killerid, killer, sizeof(killer));
  351. new slice = 100; //$100
  352. playercash = GetPlayerMoney(playerid);
  353. if(gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
  354. if(SafeTime[playerid] <= 0)
  355. {
  356. if(gTeam[killerid] != gTeam[playerid])
  357. {
  358. if(GetPlayerState(killerid) == 1)
  359. {
  360. PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
  361. }
  362. else
  363. {
  364. PlayerInfo[killerid][pKills]++;
  365. }
  366. PlayerInfo[playerid][pKills]--;
  367. }
  368. }
  369. if(((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
  370. {
  371. slice = 0;
  372. }
  373. if(((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
  374. {
  375. slice = 0;
  376. }
  377. if(playercash > 0)
  378. {
  379. SafeGivePlayerMoney(playerid, -slice);
  380. }
  381. else
  382. {
  383. slice = slice+500;
  384. }
  385. //SafeGivePlayerMoney(killerid, slice);
  386. //GameTextForPlayer(playerid, dmessage, 5000, 2);
  387. PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
  388. if(((gTeam[killerid]) == 3) && reason != 49)
  389. {
  390. SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
  391. }
  392. else if(((gTeam[killerid]) == 3) && reason == 49)
  393. {
  394. SetPlayerCriminalEx(killerid,255, "Hit And Run");
  395. }
  396. }
  397. }
  398. else if(victimteam == 2)
  399. {
  400. if(IsPlayerConnected(killerid))
  401. {
  402. //new killer[MAX_PLAYER_NAME];
  403. //GetPlayerName(killerid, killer, sizeof(killer));
  404. // Cop kill
  405. PlayerInfo[playerid][pKills]--;
  406. if(gTeam[killerid] == 2)//cops kill cop
  407. {
  408. //format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  409. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  410. SafeGivePlayerMoney(killerid, -suecost);
  411. SafeGivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
  412. }
  413. else
  414. {
  415. //format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
  416. }
  417. if(gTeam[killerid] >= 3)
  418. {
  419. WantedPoints[killerid] += 2; //+ 2 wanted points
  420. if(reason != 49)
  421. {
  422. SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
  423. }
  424. else if(reason == 49)
  425. {
  426. SetPlayerCriminalEx(killerid,255, "Hit And Run");
  427. }
  428. }
  429. if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
  430. {
  431. if(GetPlayerState(killerid) == 1)
  432. {
  433. PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
  434. }
  435. else
  436. {
  437. PlayerInfo[killerid][pKills]++;
  438. }
  439. WantedPoints[killerid]+=2;
  440. }
  441. //BroadCast(COLOR_RED, string);
  442. }
  443. }
  444. else if(victimteam == 3)
  445. {
  446. if(IsPlayerConnected(killerid))
  447. {
  448. //new killer[MAX_PLAYER_NAME];
  449. //GetPlayerName(killerid, killer, sizeof(killer));
  450. // Civ kill
  451. if((gTeam[killerid]) == 2)//cops kill civ
  452. {
  453. if(WantedLevel[playerid] < 1)
  454. {
  455. //format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  456. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  457. SafeGivePlayerMoney(killerid, -suecost);
  458. SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
  459. }
  460. }
  461. else
  462. {
  463. //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
  464. WantedPoints[killerid] += 2;
  465. }
  466. if(((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
  467. {
  468. SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
  469. }
  470. else if(((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
  471. {
  472. SetPlayerCriminalEx(killerid,255, "Hit And Run");
  473. }
  474. //BroadCast(COLOR_RED, string);
  475. }
  476. }
  477. else if(victimteam == 1)
  478. {
  479. if(IsPlayerConnected(killerid))
  480. {
  481. //new killer[MAX_PLAYER_NAME];
  482. //GetPlayerName(killerid, killer, sizeof(killer));
  483. // Civ kill
  484. if((gTeam[killerid]) == 2)//cops kill civ
  485. {
  486. //format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  487. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  488. SafeGivePlayerMoney(killerid, -suecost);
  489. SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
  490. }
  491. else if((gTeam[killerid]) == 1)//med kill civ
  492. {
  493. //format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  494. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  495. SafeGivePlayerMoney(killerid, -suecost);
  496. SafeGivePlayerMoney(playerid, suecost+10);//+100pays hospital bill
  497. }
  498. else
  499. {
  500. //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
  501. }
  502. if(((gTeam[killerid]) == 4) && reason != 49)
  503. {
  504. SetPlayerCriminalEx(killerid,255, "Prvostepeno Ubistvo");
  505. }
  506. else if(((gTeam[killerid]) == 3) && reason == 49)
  507. {
  508. SetPlayerCriminalEx(killerid,255, "Hit And Run");
  509. }
  510. //BroadCast(COLOR_RED, string);
  511. }
  512. }
  513. if(victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
  514. {
  515. SetPlayerFree(playerid,killerid, "Got Killed");
  516. }
  517. if(BusrouteEast[playerid][0] != 0 || BusrouteWest[playerid][0] != 0)
  518. {
  519. if(BusrouteEast[playerid][0] != 0) BusrouteEnd(playerid, BusrouteEast[playerid][1]);
  520. else if(BusrouteWest[playerid][0] != 0) BusrouteEnd(playerid, BusrouteWest[playerid][1]);
  521. else BusrouteEnd(playerid, 0);
  522. }
  523. if(FarmerVar[playerid] != 0)
  524. {
  525. FarmerVar[playerid] = 0;
  526. DisablePlayerCheckpoint(playerid);
  527. }
  528. if(DrugFarmerVar[playerid] != 0)
  529. {
  530. DrugFarmerVar[playerid] = 0;
  531. DisablePlayerCheckpoint(playerid);
  532. }
  533. if(SmugglerWork[playerid] != 0)
  534. {
  535. SmugglerWork[playerid] = 0;
  536. DisablePlayerCheckpoint(playerid);
  537. }
  538. SetRealMoney(playerid, ScriptMoney[playerid]);
  539. SetPlayerColor(playerid,0xBBBBBB00);
  540. SafeResetPlayerWeapons(playerid);
  541. if(IsBeingSpeced[playerid] == 1)//If the player being spectated, dies, then turn off the spec mode for the spectator.
  542. {
  543. TogglePlayerSpectating(spectatorid[playerid],0);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
  544. }
  545. if(usingcarwash == playerid)
  546. {
  547. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  548. usingcarwash = -1;
  549. UpdateDynamic3DTextLabelText(entrancetext, 0x008B00FF, "Niko trenutno ne pere vozilo.\nCijena: $150 (/carwash)");
  550. }
  551. if((PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4
  552. || PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 10
  553. || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 7) && GoChase[killerid] != playerid)
  554. {
  555. if((PlayerInfo[playerid][pWantedLevel] >= 1 || WantedPoints[playerid] >= 1 || WantedLevel[playerid] >= 1 || PlayerInfo[playerid][pWanted] >= 1) && IsACop(killerid) || PlayerInfo[killerid][Admin] >= 1338)
  556. {
  557. return 1;
  558. }
  559. TogglePlayerControllable(killerid, 0);
  560. PlayerInfo[killerid][pWeaponReset] = 1;
  561. ResetPlayerWeapons(killerid);
  562. SafeResetPlayerWeapons(killerid);
  563. if(PlayerInfo[playerid][pLevel] == 1)
  564. {
  565. PlayerInfo[killerid][pJailed] = 1;
  566. PlayerInfo[killerid][pJailTime] += 600;
  567. }
  568. DMName[killerid] = name2;
  569. SetTimerEx("kicktimer",3000,false,"i",killerid);
  570. }
  571. WantedPoints[playerid] = 0;
  572. WantedLevel[playerid] = 0;
  573. killerid = INVALID_PLAYER_ID;
  574. return 1;
  575. }
Advertisement
Add Comment
Please, Sign In to add comment