Guest User

Untitled

a guest
Aug 15th, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.31 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. if(killerid != INVALID_PLAYER_ID)
  4. {
  5. PlayerInfo[killerid][pUbistava]++; PlayerInfo[playerid][pSmrti]++;
  6. ResetPlayerWeapons(playerid); ResetujVar(playerid);
  7. }
  8. //------------------------------------------------------------------------//
  9. if(killerid != INVALID_PLAYER_ID)
  10. {
  11. if(IgracPolicajac(killerid))
  12. {
  13. PlayerInfo[killerid][pTrazeniLevel] = 0;
  14. SetPlayerColor(playerid, 0x2641FEAA);
  15. }
  16.  
  17. if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
  18. {
  19. if(PlayerInfo[killerid][pWar] > 0) return 1;
  20. PostaviWanted(killerid, "Ubistvo", "Nepoznat", 3);
  21. }
  22.  
  23. if(PlayerInfo[killerid][pTrazeniLevel] > 1000)
  24. {
  25. PlayerInfo[killerid][pTrazeniLevel] = 1000;
  26. }
  27. }
  28. //------------------------------------------------------------------------//
  29. if(PlayerInfo[playerid][pTrazeniLevel] > 0)
  30. {
  31. new string[128];
  32. g_NovacMinus(playerid, PlayerInfo[playerid][pTrazeniLevel]*3000);
  33. format(string, sizeof(string), ""ZUTA"[INFO] "CRVENA"Izgubili ste %d$ zbog umiranja sa wanted level-om "ZUTA"%d!", PlayerInfo[playerid][pTrazeniLevel]*3000, PlayerInfo[playerid][pTrazeniLevel]); //conver
  34. SCM(playerid, -1, string);
  35. PlayerInfo[playerid][pTrazeniLevel] = 0;
  36. format(string,sizeof(string), "~r~AK: ~w~ Igrac %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
  37. SetPlayerColor(playerid, BELA2);
  38. }
  39. //------------------------------------------------------------------------//
  40. if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
  41. {
  42. new string[128];
  43. format(string,sizeof(string), "Zlocin: Ubistvo - %s (WL %d) - Prijavio: Nepoznat", GetName(killerid),PlayerInfo[playerid][pTrazeniLevel]);
  44. SetPlayerColor(killerid, COLOR_RED);
  45. }
  46. //-----------------------------------------------------------------------//
  47. if(PlayerInfo[playerid][pNarucen] == 1 && (PlayerInfo[killerid][pClan] == 10 || PlayerInfo[killerid][pLider] == 10))
  48. {
  49. new string[128];
  50. g_NovacPlus(killerid, 25000);
  51. SCM(killerid,-1,""SPLAVA"[LG:RP] "BELA"Ubili ste trazenog igraca i dobili 25 000 $!");
  52. PlayerInfo[killerid][pTrazeniLevel] = 0;
  53. SetPlayerColor(killerid, BELA2);
  54. PlayerInfo[playerid][pNarucen] = 0;
  55. format(string,sizeof(string),"[LG:RP] "ZUTA"Placeni ubica je ubio %s i izvrsio svoj zadatak!", GetName(playerid));
  56. SCMTA(-1,string);
  57. }
  58. //------------------------------------------------------------------------//
  59. if(IsPlayerConnected(killerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  60. {
  61. new string[128];
  62. format(string, sizeof(string), "~r~DB - ~w~Igrac %s (ID:%d) uradio DriveBy nad %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
  63. SetPlayerColor(killerid, COLOR_RED);
  64. AltChatPosaljiPoruku(string);
  65. }
  66. //------------------------------------------------------------------------//
  67. if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
  68. {
  69. new string[128];
  70. format(string, sizeof(string), "~r~AK - ~w~Igrac %s (ID:%d) je ubio igraca %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
  71. SetPlayerColor(killerid, COLOR_RED);
  72. AltChatPosaljiPoruku(string);
  73. }
  74. //------------------------------------------------------------------------//
  75. if(GetSpeed(playerid) > 230)
  76. {
  77. if(!VoziloJeAvion(GetPlayerVehicleID(playerid)))
  78. {
  79. new string[128];
  80. format(string, sizeof(string), "~r~AC - ~w~Igrac %s (ID:%d) moguce da koristi speed hack!", GetName(playerid), playerid);
  81. AltChatPosaljiPoruku(string);
  82. return 1;
  83. }
  84. }
  85. //------------------------------------------------------------------------//
  86. if(gPlayerUsingLoopingAnim[playerid])
  87. {
  88. gPlayerUsingLoopingAnim[playerid] = 0;
  89. }
  90. //------------------------------------------------------------------------//
  91. if(reason == 22)
  92. {
  93. if(PlayerInfo[killerid][pPistSkill] >= 0 && PlayerInfo[killerid][pPistSkill] <= 999)
  94. {
  95. PlayerInfo[killerid][pPistSkill] += 15;
  96. SetPlayerSkills(killerid);
  97. }
  98. }
  99. if(reason == 23)
  100. {
  101. if(PlayerInfo[killerid][pSilenSkill] >= 0 && PlayerInfo[killerid][pSilenSkill] <= 999)
  102. {
  103. PlayerInfo[killerid][pSilenSkill] += 15;
  104. SetPlayerSkills(killerid);
  105. }
  106. }
  107. if(reason == 24)
  108. {
  109. if(PlayerInfo[killerid][pDesertSkill] >= 0 && PlayerInfo[killerid][pDesertSkill] <= 999)
  110. {
  111. PlayerInfo[killerid][pDesertSkill] += 15;
  112. SetPlayerSkills(killerid);
  113. }
  114. }
  115. if(reason == 25)
  116. {
  117. if(PlayerInfo[killerid][pShotgSkill] >= 0 && PlayerInfo[killerid][pShotgSkill] <= 999)
  118. {
  119. PlayerInfo[killerid][pShotgSkill] += 15;
  120. SetPlayerSkills(killerid);
  121. }
  122. }
  123. if(reason == 26)
  124. {
  125. if(PlayerInfo[killerid][pSawnSkill] >= 0 && PlayerInfo[killerid][pSawnSkill] <= 999)
  126. {
  127. PlayerInfo[killerid][pSawnSkill] += 15;
  128. SetPlayerSkills(killerid);
  129. }
  130. }
  131. if(reason == 27)
  132. {
  133. if(PlayerInfo[killerid][pCombSkill] >= 0 && PlayerInfo[killerid][pCombSkill] <= 999)
  134. {
  135. PlayerInfo[killerid][pCombSkill] += 15;
  136. SetPlayerSkills(killerid);
  137. }
  138. }
  139. if(reason == 28 || reason == 32)
  140. {
  141. if(PlayerInfo[killerid][pUziSkill] >= 0 && PlayerInfo[killerid][pUziSkill] <= 999)
  142. {
  143. PlayerInfo[killerid][pUziSkill] += 15;
  144. SetPlayerSkills(killerid);
  145. }
  146. }
  147. if(reason == 29)
  148. {
  149. if(PlayerInfo[killerid][pSmgSkill] >= 0 && PlayerInfo[killerid][pSmgSkill] <= 999)
  150. {
  151. PlayerInfo[killerid][pSmgSkill] += 15;
  152. SetPlayerSkills(killerid);
  153. }
  154. }
  155. if(reason == 30)
  156. {
  157. if(PlayerInfo[killerid][pAkSkill] >= 0 && PlayerInfo[killerid][pAkSkill] <= 999)
  158. {
  159. PlayerInfo[killerid][pAkSkill] += 15;
  160. SetPlayerSkills(killerid);
  161. }
  162. }
  163. if(reason == 31)
  164. {
  165. if(PlayerInfo[killerid][pM4Skill] >= 0 && PlayerInfo[killerid][pM4Skill] <= 999)
  166. {
  167. PlayerInfo[killerid][pM4Skill] += 15;
  168. SetPlayerSkills(killerid);
  169. }
  170. }
  171. //------------------------------------------------------------------------//
  172. if(zonatime[playerid] > 0)
  173. {
  174. KillTimer(zonatimer[playerid]);
  175. new id = zonaid[playerid], zonastring4[128];
  176. GangZoneStopFlashForAll(ZonaID[id]);
  177. PTDH(playerid, klecanjetd[playerid]);
  178. zonaid[playerid] -= 1;
  179. zonatime[playerid] -= 1;
  180. format(zonastring4, sizeof(zonastring4), ""CRVENA"[ZONA] "BELA"%s nije uspio da se zadrzi u zoni.", GetName(playerid));
  181. SendFamilyMessage(PlayerInfo[playerid][pLider],-1,zonastring4);
  182. }
  183. //------------------------------------------------------------------------//
  184. for(new w = 1; w < MAX_WARS; w ++)
  185. {
  186. if(killerid != INVALID_PLAYER_ID)
  187. {
  188. if(WARInfo[w][WARAktivan] == true && WARPInfo[playerid][WARIgrac] == w && WARPInfo[killerid][WARIgrac] == w)
  189. {
  190. WARPInfo[killerid][WARUbistva]++;
  191. WARPInfo[playerid][WARSmrti]++;
  192. new scm_string[128];
  193. if(WARPInfo[playerid][WARTim][0] == true && WARPInfo[killerid][WARTim][0] == true)
  194. {
  195. WARInfo[w][WARTimSkor][0] -= 3;
  196. format(scm_string, sizeof(scm_string), "(WAR) %s je ubio svog saigraca %s, te je njegov tim dobio -3 poena.", GetName(killerid), GetName(playerid));
  197. WARPoruka(w, WARLJUB, scm_string);
  198. SetWarStatsTD(w);
  199. }
  200. if(WARPInfo[playerid][WARTim][1] == true && WARPInfo[killerid][WARTim][1] == true)
  201. {
  202. WARInfo[w][WARTimSkor][1] -= 3;
  203. format(scm_string, sizeof(scm_string), "(WAR) %s je ubio svog saigraca %s, te je njegov tim dobio -3 poena.", GetName(killerid), GetName(playerid));
  204. WARPoruka(w, WARLJUB, scm_string);
  205. SetWarStatsTD(w);
  206. }
  207. if(WARPInfo[killerid][WARTim][0] == true && WARPInfo[playerid][WARTim][1] == true)
  208. {
  209. WARInfo[w][WARTimSkor][0]++;
  210. format(scm_string, sizeof(scm_string),"(WAR) %s je ubio protivnika %s!", GetName(killerid), GetName(playerid));
  211. WARPoruka(w, WARLJUB, scm_string);
  212. SetWarStatsTD(w);
  213. }
  214. if(WARPInfo[killerid][WARTim][1] == true && WARPInfo[playerid][WARTim][0] == true)
  215. {
  216. WARInfo[w][WARTimSkor][1]++;
  217. format(scm_string, sizeof(scm_string),"(WAR) %s je ubio protivnika %s!", GetName(killerid), GetName(playerid));
  218. WARPoruka(w, WARLJUB, scm_string);
  219. SetWarStatsTD(w);
  220. }
  221. return 1;
  222. }
  223. }
  224. }
  225. //------------------------------------------------------------------------//
  226. return 1;
  227. }
Advertisement
Add Comment
Please, Sign In to add comment