Guest User

Untitled

a guest
Nov 29th, 2021
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.60 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. JBC_SetPlayerArmour(playerid, 0);
  4. DisablePlayerCheckpoint(playerid);
  5. KillTimer(VuciTimer[playerid]);
  6. PosaoGPS[playerid] = 0;
  7. if(!Policajac(playerid))
  8. {
  9. new Float:Xx,Float:Yy,Float:Zz;
  10. GetPlayerPos(playerid, Xx, Yy, Zz);
  11. DropGun(playerid, GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),Xx,Yy,Zz,GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
  12. }
  13. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  14. {
  15. PlayerInfo[killerid][pUbistava]++; PlayerInfo[playerid][pSmrti]++;
  16. SPasicResetPlayerWeapons(playerid); ResetujVar(playerid);
  17. }
  18. if(WarZapocet == 1)
  19. {
  20. if(PlayerInfo[playerid][pWar] == 1)
  21. {
  22. WarBrojanje2++;
  23. PlayerInfo[killerid][pTrazeniLevel] = 0;
  24. SetPlayerColor(killerid, BELA2);
  25. g_NovacPlus(playerid, 100);
  26. }
  27. else if(PlayerInfo[playerid][pWar] == 2)
  28. {
  29. WarBrojanje1++;
  30. PlayerInfo[killerid][pTrazeniLevel] = 0;
  31. SetPlayerColor(killerid, BELA2);
  32. g_NovacPlus(playerid, 100);
  33. }
  34. }
  35. ////////////////////////////////////////////////////////////
  36. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  37. {
  38. if(IgracPolicajac(killerid))
  39. {
  40. PlayerInfo[killerid][pTrazeniLevel] = 0;
  41. SetPlayerColor(playerid, 0x2641FEAA);
  42. }
  43. }
  44. ////////////////////////////////////////////////////////////
  45. if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
  46. {
  47. if(PlayerInfo[killerid][pWar] > 0) return 1;
  48. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  49. {
  50.  
  51. PostaviWanted(killerid, "Ubistvo", "Nepoznat", 3);
  52. }
  53. }
  54. ////////////////////////////////////////////////////////////
  55. if(PlayerInfo[killerid][pTrazeniLevel] > 1000)
  56. {
  57. PlayerInfo[killerid][pTrazeniLevel] = 1000;
  58. }
  59. if((!Policajac(killerid) && PlayerInfo[killerid][pUfbi] == 1) && Policajac(playerid))
  60. {
  61. new rand = random(sizeof(RandomZatvor));
  62. JBC_SetPlayerPos(killerid, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
  63. SetPlayerInterior(killerid, 0);
  64. JBC_TogglePlayerControllable(killerid, 0);
  65. freeze[killerid] = SetTimerEx("Freeze",5000, false, "i", killerid);
  66. PlayerInfo[killerid][pZatvor] = 2;
  67. PlayerInfo[killerid][pZatvorenVreme] = 30*60;
  68. new string[256];
  69. format(string, sizeof(string), ""CRVENA"[AG:RPG] Zatvoreni ste u zatvor na 30 minuta zbog SK!.");
  70. SCM(killerid, -1, string);
  71. format(string,sizeof(string), ""CRVENA"[AG:RPG SK] "SIVA"Igrac %s (ID:%d) je uradio SK nad igracem %s (ID:%d) i zatvoren je na 30 minuta!", GetName(killerid), killerid, GetName(playerid), playerid);
  72. AdminGameMaster(-1, string);
  73. }
  74. ////////////////////////////////////////////////////////////
  75. if(PlayerInfo[playerid][pTrazeniLevel] > 0)
  76. {
  77. new string[256];
  78. g_NovacMinus(playerid, PlayerInfo[playerid][pTrazeniLevel]*3000);
  79. SCMF(playerid, -1, ""ZUTA"[INFO] "CRVENA"Izgubili ste %d$ zbog umiranja sa wanted level-om "ZUTA"%d!", PlayerInfo[playerid][pTrazeniLevel]*1500, PlayerInfo[playerid][pTrazeniLevel]);
  80. PlayerInfo[playerid][pTrazeniLevel] = 0;
  81. format(string,sizeof(string),""CRVENA"[AG:RPG] "BELA"Igrac %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
  82. CFBIPD(-1, string);
  83. SetPlayerColor(playerid, BELA2);
  84. }
  85. ////////////////////////////////////////////////////////////
  86. if(IsPlayerConnected(killerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  87. {
  88. new string[256];
  89. format(string,sizeof(string), ""CRVENA"[AG:RPG Anti DB] "SIVA"Igrac %s (ID:%d) je uradio Drive By nad igracem %s (ID:%d)!", GetName(killerid), killerid, GetName(playerid), playerid);
  90. AdminGameMaster(-1, string);
  91. SetPlayerColor(killerid, COLOR_RED);
  92. }
  93. ////////////////////////////////////////////////////////////
  94. if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
  95. {
  96. new string[256];
  97. format(string,sizeof(string), ""CRVENA"[AG:RPG AK] "SIVA"Igrac %s (ID:%d) je ubio igraca %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
  98. AdminGameMaster(-1, string);
  99. if(!Policajac(killerid))
  100. {
  101. SetPlayerColor(killerid, COLOR_RED);
  102. }
  103. if(PlayerInfo[playerid][pNarucen] == 1 && (PlayerInfo[killerid][pClan] == 10 || PlayerInfo[killerid][pLider] == 10))
  104. {
  105. g_NovacPlus(killerid, 17000);
  106. SCM(killerid,-1,""SPLAVA"[AG:RPG]:"BELA"Ubili ste trazenog igraca i dobili 17 000 $!");
  107. PlayerInfo[killerid][pTrazeniLevel] = 0;
  108. SetPlayerColor(killerid, BELA2);
  109. PlayerInfo[playerid][pNarucen] = 0;
  110. format(string,sizeof(string),"[AG:RPG] "ZUTA"Placeni ubica je ubio %s i izvrsio svoj zadatak!", GetName(playerid));
  111. SCMTA(-1,string);
  112. }
  113. }
  114. ////////////////////////////////////////////////////////////
  115. if(gPlayerUsingLoopingAnim[playerid])
  116. {
  117. gPlayerUsingLoopingAnim[playerid] = 0;
  118. }
  119.  
  120. if(InCP[playerid][Idlewood] == 1)
  121. {
  122. KillTimer(g_timer[playerid][Idlewood]);
  123. KillTimer(CountTime[playerid]);
  124. UnderAttack[Idlewood] = 0;
  125. }
  126. if(InCP[playerid][Hospital] == 1)
  127. {
  128. KillTimer(g_timer[playerid][Hospital]);
  129. KillTimer(CountTime[playerid]);
  130. UnderAttack[Hospital] = 0;
  131. }
  132. if(InCP[playerid][Ammunation] == 1)
  133. {
  134. KillTimer(g_timer[playerid][Ammunation]);
  135. KillTimer(CountTime[playerid]);
  136. UnderAttack[Ammunation] = 0;
  137. }
  138. if(InCP[playerid][Stadium] == 1)
  139. {
  140. KillTimer(g_timer[playerid][Stadium]);
  141. KillTimer(CountTime[playerid]);
  142. UnderAttack[Stadium] = 0;
  143. }
  144. ////////////////////////////////////////////////////////////
  145. if(reason == 22)
  146. {
  147. if(PlayerInfo[killerid][pPistSkill] >= 0 && PlayerInfo[killerid][pPistSkill] <= 1000)
  148. {
  149. PlayerInfo[killerid][pPistSkill] += 2;
  150. SetPlayerSkills(killerid);
  151. }
  152. }
  153. if(reason == 23)
  154. {
  155. if(PlayerInfo[killerid][pSilenSkill] >= 0 && PlayerInfo[killerid][pSilenSkill] <= 1000)
  156. {
  157. PlayerInfo[killerid][pSilenSkill] += 2;
  158. SetPlayerSkills(killerid);
  159. }
  160. }
  161. if(reason == 24)
  162. {
  163. if(PlayerInfo[killerid][pDesertSkill] >= 0 && PlayerInfo[killerid][pDesertSkill] <= 1000)
  164. {
  165. PlayerInfo[killerid][pDesertSkill] += 2;
  166. SetPlayerSkills(killerid);
  167. }
  168. }
  169. if(reason == 25)
  170. {
  171. if(PlayerInfo[killerid][pShotgSkill] >= 0 && PlayerInfo[killerid][pShotgSkill] <= 1000)
  172. {
  173. PlayerInfo[killerid][pShotgSkill] += 2;
  174. SetPlayerSkills(killerid);
  175. }
  176. }
  177. if(reason == 26)
  178. {
  179. if(PlayerInfo[killerid][pSawnSkill] >= 0 && PlayerInfo[killerid][pSawnSkill] <= 800)
  180. {
  181. PlayerInfo[killerid][pSawnSkill] += 2;
  182. SetPlayerSkills(killerid);
  183. }
  184. }
  185. if(reason == 27)
  186. {
  187. if(PlayerInfo[killerid][pCombSkill] >= 0 && PlayerInfo[killerid][pCombSkill] <= 1000)
  188. {
  189. PlayerInfo[killerid][pCombSkill] += 2;
  190. SetPlayerSkills(killerid);
  191. }
  192. }
  193.  
  194. if(reason == 28 || reason == 32)
  195. {
  196. if(PlayerInfo[killerid][pUziSkill] >= 0 && PlayerInfo[killerid][pUziSkill] <= 800)
  197. {
  198. PlayerInfo[killerid][pUziSkill] += 2;
  199. SetPlayerSkills(killerid);
  200. }
  201. }
  202.  
  203. if(reason == 29)
  204. {
  205. if(PlayerInfo[killerid][pSmgSkill] >= 0 && PlayerInfo[killerid][pSmgSkill] <= 1000)
  206. {
  207. PlayerInfo[killerid][pSmgSkill] += 2;
  208. SetPlayerSkills(killerid);
  209. }
  210. }
  211.  
  212. if(reason == 30)
  213. {
  214. if(PlayerInfo[killerid][pAkSkill] >= 0 && PlayerInfo[killerid][pAkSkill] <= 1000)
  215. {
  216. PlayerInfo[killerid][pAkSkill] += 2;
  217. SetPlayerSkills(killerid);
  218. }
  219. }
  220.  
  221. if(reason == 31)
  222. {
  223. if(PlayerInfo[killerid][pM4Skill] >= 0 && PlayerInfo[killerid][pM4Skill] <= 1000)
  224. {
  225. PlayerInfo[killerid][pM4Skill] += 2;
  226. SetPlayerSkills(killerid);
  227. }
  228. }
  229. return 1;
  230. }
  231.  
  232. encode_tires(tire1, tire2, tire3, tire4) return tire1 | (tire2 << 1) | (tire3 << 2) | (tire4 << 3);
Advertisement
Add Comment
Please, Sign In to add comment