Guest User

Untitled

a guest
Apr 3rd, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.68 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. SetPlayerArmour(playerid, 0);
  4. DisablePlayerCheckpoint(playerid);
  5. TextDrawHideForPlayer(playerid,HealthBar[playerid]);
  6. KillTimer(VuciTimer[playerid]);
  7. PosaoGPS[playerid] = 0;
  8. if(!Policajac(playerid))
  9. {
  10. new Float:Xx,Float:Yy,Float:Zz;
  11. GetPlayerPos(playerid, Xx, Yy, Zz);
  12. DropGun(playerid, GetPlayerWeapon(playerid),GetPlayerAmmo(playerid),Xx,Yy,Zz,GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
  13. }
  14. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  15. {
  16. PlayerInfo[killerid][pUbistava]++; PlayerInfo[playerid][pSmrti]++;
  17. RajsevaResetPlayerWeapons(playerid); ResetujVar(playerid);
  18. }
  19. ////////////////////////////////////////////////////////////
  20. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  21. {
  22. if(IgracPolicajac(killerid))
  23. {
  24. PlayerInfo[killerid][pTrazeniLevel] = 0;
  25. SetPlayerColor(playerid, 0x2641FEAA);
  26. }
  27. }
  28. ////////////////////////////////////////////////////////////
  29. if(!IgracPolicajac(killerid) && IsPlayerConnected(playerid))
  30. {
  31. if(PlayerInfo[killerid][Tim1] > 0) return 1;
  32. if(PlayerInfo[killerid][Tim1] > 2) return 1;
  33. if(killerid != INVALID_PLAYER_ID) // Valid killer, give cash+score
  34. {
  35.  
  36. PostaviWanted(killerid, "Ubistvo", "Nepoznat", 6);
  37. }
  38. }
  39. ////////////////////////////////////////////////////////////
  40. if(PlayerInfo[killerid][pTrazeniLevel] > 1000)
  41. {
  42. PlayerInfo[killerid][pTrazeniLevel] = 1000;
  43. }
  44. if((!Policajac(killerid) && PlayerInfo[killerid][pUfbi] == 1) && Policajac(playerid))
  45. {
  46. new rand = random(sizeof(RandomZatvor));
  47. SetPlayerPos(killerid, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
  48. SetPlayerInterior(killerid, 0);
  49. TogglePlayerControllable(killerid, 0);
  50. freeze[killerid] = SetTimerEx("Freeze",5000, false, "i", killerid);
  51. PlayerInfo[killerid][pZatvor] = 2;
  52. PlayerInfo[killerid][pZatvorenVreme] = 30*60;
  53. new string[256];
  54. format(string, sizeof(string), ""CRVENA"SPAWN-KILL: Zatvoreni ste u zatvor na 30 minuta zbog SK!.");
  55. SCM(killerid, -1, string);
  56. format(string,sizeof(string), ""CRVENA"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);
  57. AdminGameMaster(-1, string);
  58. }
  59. /////////////////////////////////////////////////////////////
  60. if(zonatime[playerid] > 0)
  61. {
  62. KillTimer(zonatimer[playerid]);
  63. new id = zonaid[playerid];
  64. GangZoneStopFlashForAll(ZonaID[id]);
  65. PlayerTextDrawHide(playerid, klecanjetd[playerid]);
  66. zonaid[playerid] -= 1;
  67. zonatime[playerid] -= 1;
  68. SCM(playerid, -1, ""CRVENA"Niste uspeli da zauzmete teritoriju, spreceni ste!");
  69. }
  70. ////////////////////////////////////////////////////////////
  71. if(PlayerInfo[playerid][pTrazeniLevel] > 0)
  72. {
  73. new string[256];
  74. g_NovacMinus(playerid, PlayerInfo[playerid][pTrazeniLevel]*3000);
  75. SCMF(playerid, -1, "Ubijeni ste! Gubite %d$ zbog umiranja sa wanted level-om "CRVENA"%d!", PlayerInfo[playerid][pTrazeniLevel]*1500, PlayerInfo[playerid][pTrazeniLevel]);
  76. PlayerInfo[playerid][pTrazeniLevel] = 0;
  77. format(string,sizeof(string),""PLAVA"OBAVESTENJE:{FFFFFF}Svim jedniciama, gradjanin %s je ubijen/se ubio sa wanted level-om!",GetName(playerid));
  78. CFBIPD(-1, string);
  79. SetPlayerColor(playerid, BELA2);
  80. }
  81. ////////////////////////////////////////////////////////////
  82. if(IsPlayerConnected(killerid) && GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
  83. {
  84. new string[256];
  85. format(string,sizeof(string), ""CRVENA"DRIVE-BY: "SIVA"Igrac %s (ID:%d) je uradio Drive By nad igracem %s (ID:%d)!", GetName(killerid), killerid, GetName(playerid), playerid);
  86. AdminGameMaster(-1, string);
  87. SetPlayerColor(killerid, COLOR_RED);
  88. }
  89. ////////////////////////////////////////////////////////////
  90. if(IsPlayerConnected(killerid) && PlayerInfo[playerid][pLevel] >= 1)
  91. {
  92. new string[256];
  93. format(string,sizeof(string), ""CRVENA"A-KILL: "SIVA"Igrac %s (ID:%d) je ubio igraca %s (ID:%d)", GetName(killerid), killerid, GetName(playerid), playerid);
  94. AdminGameMaster(-1, string);
  95. if(!Policajac(killerid))
  96. {
  97. SetPlayerColor(killerid, COLOR_RED);
  98. }
  99. if(PlayerInfo[playerid][pNarucen] == 1 && (PlayerInfo[killerid][pClan] == 10 || PlayerInfo[killerid][pLider] == 10))
  100. {
  101. g_NovacPlus(killerid, 17000);
  102. SCM(killerid,-1,""SRWBOJA"[TA:RPG]{FFFFFF}Ubili ste trazenog igraca i dobili 17 000 $!");
  103. PlayerInfo[killerid][pTrazeniLevel] = 0;
  104. SetPlayerColor(killerid, BELA2);
  105. PlayerInfo[playerid][pNarucen] = 0;
  106. format(string,sizeof(string),""SRWBOJA"UBISTVO: {FFFFFF}Placeni ubica je ubio %s i izvrsio svoj zadatak!", GetName(playerid));
  107. SCMTA(-1,string);
  108. }
  109. }
  110. ////////////////////////////////////////////////////////////
  111. if(gPlayerUsingLoopingAnim[playerid])
  112. {
  113. gPlayerUsingLoopingAnim[playerid] = 0;
  114. }
  115.  
  116. if(InCP[playerid][Ganton] == 1)
  117. {
  118. KillTimer(g_timer[playerid][Ganton]);
  119. KillTimer(CountTime[playerid]);
  120. UnderAttack[Ganton] = 0;
  121. }
  122. if(InCP[playerid][Glen] == 1)
  123. {
  124. KillTimer(g_timer[playerid][Glen]);
  125. KillTimer(CountTime[playerid]);
  126. UnderAttack[Glen] = 0;
  127. }
  128. if(InCP[playerid][Colinas] == 1)
  129. {
  130. KillTimer(g_timer[playerid][Colinas]);
  131. KillTimer(CountTime[playerid]);
  132. UnderAttack[Colinas] = 0;
  133. }
  134. if(InCP[playerid][Vinewood] == 1)
  135. {
  136. KillTimer(g_timer[playerid][Vinewood]);
  137. KillTimer(CountTime[playerid]);
  138. UnderAttack[Vinewood] = 0;
  139. }
  140. if(InCP[playerid][Mulholland] == 1)
  141. {
  142. KillTimer(g_timer[playerid][Mulholland]);
  143. KillTimer(CountTime[playerid]);
  144. UnderAttack[Mulholland] = 0;
  145.  
  146. }
  147. if(InCP[playerid][Corona] == 1)
  148. {
  149. KillTimer(g_timer[playerid][Corona]);
  150. KillTimer(CountTime[playerid]);
  151. UnderAttack[Corona] = 0;
  152. }
  153. ////////////////////////////////////////////////////////////
  154. if(reason == 22)
  155. {
  156. if(PlayerInfo[killerid][pPistSkill] >= 0 && PlayerInfo[killerid][pPistSkill] <= 999)
  157. {
  158. PlayerInfo[killerid][pPistSkill] += 3;
  159. SetPlayerSkills(killerid);
  160. }
  161. }
  162. if(reason == 23)
  163. {
  164. if(PlayerInfo[killerid][pSilenSkill] >= 0 && PlayerInfo[killerid][pSilenSkill] <= 999)
  165. {
  166. PlayerInfo[killerid][pSilenSkill] += 3;
  167. SetPlayerSkills(killerid);
  168. }
  169. }
  170. if(reason == 24)
  171. {
  172. if(PlayerInfo[killerid][pDesertSkill] >= 0 && PlayerInfo[killerid][pDesertSkill] <= 999)
  173. {
  174. PlayerInfo[killerid][pDesertSkill] += 3;
  175. SetPlayerSkills(killerid);
  176. }
  177. }
  178. if(reason == 25)
  179. {
  180. if(PlayerInfo[killerid][pShotgSkill] >= 0 && PlayerInfo[killerid][pShotgSkill] <= 999)
  181. {
  182. PlayerInfo[killerid][pShotgSkill] += 3;
  183. SetPlayerSkills(killerid);
  184. }
  185. }
  186. if(reason == 26)
  187. {
  188. if(PlayerInfo[killerid][pSawnSkill] >= 0 && PlayerInfo[killerid][pSawnSkill] <= 999)
  189. {
  190. PlayerInfo[killerid][pSawnSkill] += 3;
  191. SetPlayerSkills(killerid);
  192. }
  193. }
  194. if(reason == 27)
  195. {
  196. if(PlayerInfo[killerid][pCombSkill] >= 0 && PlayerInfo[killerid][pCombSkill] <= 999)
  197. {
  198. PlayerInfo[killerid][pCombSkill] += 3;
  199. SetPlayerSkills(killerid);
  200. }
  201. }
  202.  
  203. if(reason == 28 || reason == 32)
  204. {
  205. if(PlayerInfo[killerid][pUziSkill] >= 0 && PlayerInfo[killerid][pUziSkill] <= 999)
  206. {
  207. PlayerInfo[killerid][pUziSkill] += 3;
  208. SetPlayerSkills(killerid);
  209. }
  210. }
  211.  
  212. if(reason == 29)
  213. {
  214. if(PlayerInfo[killerid][pSmgSkill] >= 0 && PlayerInfo[killerid][pSmgSkill] <= 999)
  215. {
  216. PlayerInfo[killerid][pSmgSkill] += 3;
  217. SetPlayerSkills(killerid);
  218. }
  219. }
  220.  
  221. if(reason == 30)
  222. {
  223. if(PlayerInfo[killerid][pAkSkill] >= 0 && PlayerInfo[killerid][pAkSkill] <= 999)
  224. {
  225. PlayerInfo[killerid][pAkSkill] += 3;
  226. SetPlayerSkills(killerid);
  227. }
  228. }
  229.  
  230. if(reason == 31)
  231. {
  232. if(PlayerInfo[killerid][pM4Skill] >= 0 && PlayerInfo[killerid][pM4Skill] <= 999)
  233. {
  234. PlayerInfo[killerid][pM4Skill] += 3;
  235. SetPlayerSkills(killerid);
  236. }
  237. //==========================================================================
  238. if(PlayerInfo[playerid][Tim1] == 0 && PlayerInfo[playerid][Tim2] == 0)//DAKLE ZA BOLNICU I OVAJ CRNI TD DODAJ SAMO OVO LIJEVO I ZAGRADE,ISTO TO STAVI POD ONO DAVANJE WANTED LEVELA
  239. {
  240. //UBolnicu[playerid] = 1;
  241. PlayerTextDrawShow(playerid,crniekran[playerid]);
  242. SetTimerEx("StaviProzirno", 10000,false,"i",playerid);
  243. }
  244.  
  245. new str[200];
  246. if(PlayerInfo[killerid][Tim1] == 1)
  247. {
  248. if(PlayerInfo[playerid][Tim2] == 1)
  249. {
  250. tim2b += 1;
  251. format(str,sizeof(str),"{AF19B1}WAR | %s je ubio %s | BODOVA +1",GetName(killerid),GetName(playerid));
  252. }
  253. }
  254. if(PlayerInfo[killerid][Tim2] == 1)
  255. {
  256. if(PlayerInfo[playerid][Tim1] == 1)
  257. {
  258. tim1b += 1;
  259. format(str,sizeof(str),"{AF19B1}WAR | %s je ubio %s | BODOVA +1",GetName(killerid),GetName(playerid));
  260. }
  261. }
  262. if(PlayerInfo[killerid][Tim1] == 1)
  263. {
  264. if(PlayerInfo[playerid][Tim1] == 1)
  265. {
  266. if(PlayerInfo[killerid][pLider] >= 1)
  267. {
  268. tim2b -= 2;
  269. format(str,sizeof(str),"{AF19B1}WAR | Lider %s je ubio %s | BODOVA -2 | TEAM KILL",GetName(killerid),GetName(playerid));
  270. }
  271. else
  272. {
  273. tim2b -= 1;
  274. format(str,sizeof(str),"{AF19B1}WAR | %s je ubio %s | BODOVA -1 | TEAM KILL",GetName(killerid),GetName(playerid));
  275. }
  276. }
  277. }
  278. if(PlayerInfo[killerid][Tim2] == 1)
  279. {
  280. if(PlayerInfo[playerid][Tim2] == 1)
  281. {
  282. if(PlayerInfo[killerid][pLider] >= 1)
  283. {
  284. tim1b -= 2;
  285. format(str,sizeof(str),"{AF19B1}WAR | Lider %s je ubio %s | BODOVA -2 | TEAM KILL",GetName(killerid),GetName(playerid));
  286. }
  287. else
  288. {
  289. tim1b -= 1;
  290. format(str,sizeof(str),"{AF19B1}WAR | %s je ubio %s | BODOVA -1 | TEAM KILL",GetName(killerid),GetName(playerid));
  291. }
  292. }
  293. }
  294. for(new i = 0; i < MAX_PLAYERS; i++)
  295. {
  296. new stringasa[50];
  297. if(PlayerInfo[i][Tim2] == 1)
  298. {
  299. SendClientMessage(i,GRAD2,str);
  300. format(stringasa, sizeof(stringasa), "TIM1 : %d", tim1b);
  301. TextDrawSetString(waric1, stringasa);
  302. format(stringasa, sizeof(stringasa), "TIM2 : %d", tim2b);
  303. TextDrawSetString(waric2, stringasa);
  304. TextDrawShowForPlayer(i,waric1);
  305. TextDrawShowForPlayer(i,waric2);
  306. }
  307. if(PlayerInfo[i][Tim1] == 1)
  308. {
  309. SendClientMessage(i,GRAD2,str);
  310. format(stringasa, sizeof(stringasa), "TIM1 : %d", tim2b);
  311. TextDrawSetString(waric1, stringasa);
  312. format(stringasa, sizeof(stringasa), "TIM2 : %d", tim1b);
  313. TextDrawSetString(waric2, stringasa);
  314. TextDrawShowForPlayer(i,waric1);
  315. TextDrawShowForPlayer(i,waric2);
  316. }
  317. }
  318. }
  319. return 1;
  320. }
Advertisement
Add Comment
Please, Sign In to add comment