Advertisement
Guest User

fffffffffff

a guest
Nov 22nd, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.09 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. if(IsConnected[playerid] == 0) return 1;
  4.  
  5. isDead[playerid] = true; // anti cheat
  6.  
  7. if(killerid != INVALID_PLAYER_ID) {
  8. PlayerTextDrawSetString(killerid, hitwin[killerid], "~w~DEAD");
  9. PlayerTextDrawShow(killerid, hitwin[killerid]);
  10. SetTimerEx("DamageWinReset", 5000, false, "i", killerid);
  11. }
  12.  
  13. PlayerTextDrawSetString(playerid, hitloose[playerid], "~r~DEAD");
  14. PlayerTextDrawShow(playerid, hitloose[playerid]);
  15. SetTimerEx("DamageLooseReset", 5000, false, "i", playerid);
  16. if(killerid != INVALID_PLAYER_ID) {
  17. if(InWar[killerid] == 1)
  18. {
  19. SendClientMessage(killerid, COLOR_BLUE, "[WAR]{36a81a} +1 kill to your series.");
  20.  
  21. if(GetPlayerWantedLevel(playerid) >= 1) {
  22. SendClientMessage(killerid, COLOR_BLUE, "[KILLSTREAKS]{36a81a} +200$ for killing a wanted player (+1 star).");
  23. GiveMoney(killerid, 200); }
  24.  
  25. if(GetPlayerTeam(playerid) == CLAN)
  26. {
  27. SendClientMessage(killerid, COLOR_BLUE, "[GAIN]{36a81a} +5 EXP | +5 RAGE | +25 POINTS CLANS");
  28. }
  29.  
  30. if(GetPlayerTeam(playerid) != CLAN)
  31. {
  32. SendClientMessage(killerid, COLOR_BLUE, "[GAIN]{36a81a} +25 EXP | +5 RAGE");
  33. }
  34. GivePlayerExp(killerid, 5);
  35. GivePlayerRage(killerid, 5);
  36. PlayerInfo[killerid][pKills]++; // On rajoute +1 dabs kes stats kills du killer
  37. PlayerInfo[playerid][pDeaths]++; // On rajoute +1 dans les stats morts du joueur tués
  38. new wanted = GetPlayerWantedLevel(killerid);
  39. wanted++;
  40. SetPlayerWantedLevel(killerid, wanted);
  41. new Float:x, Float:y, Float:z;
  42. GetPlayerPos(playerid, x, y, z);
  43. healwar = CreatePickup(1240, 8, x, y+3, z, 0);
  44. armourwar = CreatePickup(1242, 8, x, y+1, z, 0);
  45.  
  46.  
  47. PlayerInfo[playerid][addColis] = false;
  48.  
  49. /*new pickid, armeid, muni;
  50. for (new i = 0; i <= 12; i++)
  51. {
  52. GetPlayerWeaponData(playerid, i, armeid, muni);
  53. if(armeid != 0)
  54. {
  55. new Float: Pos[3];
  56. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  57. pickid = CreatePickup(GetModel(armeid), 19, Pos[0], Pos[1]+2, Pos[2], -1);
  58. PickInfo[pickid][Valide] = 1;
  59. PickInfo[pickid][ArmeID] = armeid; PickInfo[pickid][Munitions] = muni;
  60. GetPlayerPos(playerid, PickInfo[pickid][pX], PickInfo[pickid][pY], PickInfo[pickid][pZ]);
  61. }
  62. }*/
  63. if(GetPlayerTeam(playerid) == CLAN)
  64. {
  65. ClanInfo[ PlayerInfo[playerid][pTeam] ][cDeathsWar]++;
  66. ClanInfo[ PlayerInfo[killerid][pTeam] ][cKillsWar]++;
  67.  
  68. ClanInfo[ PlayerInfo[playerid][pTeam] ][cPoints] += 25;
  69. }
  70. if(PlayerInfo[playerid][pHit] != 0)
  71. {
  72.  
  73. // On retire l'argent/exp au mec mort :
  74. new hitmoney = PlayerInfo[playerid][pHit]/2;
  75. new hitexp = PlayerInfo[playerid][pHit]/4;
  76. GiveMoney(playerid, -hitmoney);
  77. GivePlayerExp(playerid, -hitexp);
  78.  
  79. // On donne l'argent/exp au mec l'ayant tué :
  80. GiveMoney(killerid, PlayerInfo[playerid][pHit]);
  81. new hitwinexp = PlayerInfo[playerid][pHit]/4;
  82. GivePlayerExp(killerid, hitwinexp);
  83.  
  84.  
  85.  
  86. new string[MAX_STRING_MSG];
  87. format(string, sizeof(string), "[HIT]{FFFFFF} %s has kill the hitman %s. He win %d$", GetName(killerid), GetName(playerid), PlayerInfo[playerid][pHit]);
  88. SendClientMessageToAll(COLOR_BLUE, string);
  89. PlayerInfo[playerid][pHit] = 0;
  90.  
  91. format(string, sizeof(string), "[HIT]{FFFFFF} You have been killing by being hitman, you lose %d$ and %d EXP.", hitmoney, hitexp);
  92. SendClientMessage(playerid, COLOR_BLUE, string);
  93.  
  94. format(string, sizeof(string), "[HIT]{FFFFFF} You have kill the hitman, you win %d$ and %d EXP.", PlayerInfo[playerid][pHit], hitwinexp);
  95. SendClientMessage(killerid, COLOR_BLUE, string);
  96.  
  97. PlayerInfo[playerid][pHit] = 0;
  98. PlayerInfo[playerid][pHitTime] = 0;
  99. }
  100. }
  101. }
  102.  
  103. if(PlayerInfo[playerid][inarene] == true)
  104. {
  105. Safe(playerid);
  106. for(new i=0; i<MAX_PLAYERS; i++)
  107. {
  108. if(IsPlayerConnected(i)) continue;
  109. if(ClanInfo[ PlayerInfo[playerid][pTeam] ][cID] == ClanInfo[ PlayerInfo[i][pTeam] ][cID])
  110. {
  111. ClanInfo[ PlayerInfo[playerid][pTeam] ][cPlayersInArene]--;
  112. if(ClanInfo[ PlayerInfo[playerid][pTeam] ][cPlayersInArene] == 0)
  113. {
  114. if(killerid != INVALID_PLAYER_ID) {
  115. new string[MAX_STRING_MSG];
  116. format(string, sizeof(string), "[ARENA]{FFFFFF} The clan %s has won the arena against %s.", ClanInfo[ PlayerInfo[killerid][pTeam] ][cName]);
  117. SendClientMessageToAll(COLOR_BLUE, string);
  118. }
  119. ClanInfo[ PlayerInfo[playerid][pTeam] ][cPlayersInArene] = 0;
  120. // Ajouter le ratio + arène
  121. }
  122. }
  123.  
  124. }
  125. }
  126. if(killerid != INVALID_PLAYER_ID) {
  127. if(DuelInfo[killerid][induel] == true)
  128. {
  129.  
  130. SetTimerEx("Safe", 2000, false, "i", killerid);
  131. new string[MAX_STRING_MSG], Float:HP, Float:ARMOUR;
  132.  
  133. GetPlayerHealth(killerid, HP);
  134. GetPlayerArmour(killerid, ARMOUR);
  135. format(string, sizeof(string), "[DUEL]{FA9325} %s has won the duel against %s. [%0.d HP | %0.d ARM]", GetName(killerid), GetName(playerid), floatround(HP, floatround_ceil), floatround(ARMOUR, floatround_ceil));
  136. SendClientMessageToAll(COLOR_BLUE, string);
  137.  
  138. SendClientMessage(killerid, COLOR_BLUE, "[SAFE]{FA9325} You will be teleported to safe zone in 2 seconds.");
  139.  
  140. ApplyAnimation(killerid,"CASINO","manwinb",1.0,0,0,1,0,0);
  141. ApplyAnimation(killerid,"CASINO","manwinb",1.0,0,0,1,0,0);
  142. ApplyAnimation(killerid,"CASINO","manwinb",1.0,0,0,1,0,0);
  143.  
  144. PlayerInfo[killerid][pKillsDuel]++;
  145. PlayerInfo[playerid][pDeathsDuel]++;
  146.  
  147. DuelInfo[playerid][induel] = false;
  148. DuelInfo[killerid][induel] = false;
  149. DuelInfo[playerid][duelcreate] = false;
  150. DuelInfo[killerid][duelcreate] = false;
  151. ResetPlayerWeapons(playerid);
  152. Safe(playerid);
  153. }
  154. }
  155. if(WantedON == 1 && playerid == wantedplayer && killerid != INVALID_PLAYER_ID)
  156. {
  157. KillTimer(wanted_timer1[playerid]);
  158. KillTimer(wanted_timer2[playerid]);
  159. KillTimer(wanted_timer1[playerid]);
  160. KillTimer(wanted_timer2[playerid]);
  161.  
  162. wantedstart(killerid);
  163. new string[MAX_STRING_MSG];
  164. format(string, 104, "[WANTED]{FFFFFF} The wanted %s was killing. %s is the new wanted.", GetName(playerid), GetName(killerid));
  165. SendClientMessageToAll(COLOR_BLUE, string);
  166. }
  167. if(WantedON == 1 && playerid == wantedplayer && killerid == INVALID_PLAYER_ID)
  168. {
  169. // new string[MAX_STRING_MSG];
  170. KillTimer(wanted_timer1[wantedplayer]);
  171. KillTimer(wanted_timer2[wantedplayer]);
  172. KillTimer(wanted_timer1[wantedplayer]);
  173. KillTimer(wanted_timer2[wantedplayer]);
  174. //SendClientMessageToAll(COLOR_BLUE, string);
  175. SendClientMessageToAll(COLOR_BLUE, "[WANTED] "cBlanc"The wanted committed suicide, the wanted is canceled.");
  176. eventencours = 0;
  177. WantedON = 0;
  178. KillTimer(wantedtimer);
  179. }
  180.  
  181. // BRAQUAGE
  182. printf("braquage = %d", braquage);
  183. if(braquage == 1)
  184. {
  185. new string[MAX_STRING_MSG];
  186. printf("braquageencours = %d - killerid = %d", GetPVarInt(playerid, "braquageencours"), killerid);
  187. if(GetPVarInt(playerid, "braquageencours") == 1 && killerid != INVALID_PLAYER_ID)
  188. {
  189. DeletePVar(playerid, "braquageencours");
  190. format(string, sizeof(string), "[ROB]{FFFFFF} %s have kill %s in full robbery, the hold-up is canceled.", GetName(killerid), GetName(playerid));
  191. SendClientMessageToAll(COLOR_BLUE, string);
  192. KillTimer(timerbraquage);
  193. braquage = 0;
  194. KillTimer(timerid);
  195. }
  196. else if(GetPVarInt(playerid, "braquageencours") == 1 && killerid == INVALID_PLAYER_ID)
  197. {
  198. DeletePVar(playerid, "braquageencours");
  199. format(string, sizeof(string), "[ROB]{FFFFFF} %s committed suicide, the hold-up is canceled.", GetName(playerid));
  200. SendClientMessageToAll(COLOR_BLUE, string);
  201. KillTimer(timerbraquage);
  202. braquage = 0;
  203. KillTimer(timerid);
  204. }
  205. if(braquage == 1 && playerid == idbraqueur && killerid != INVALID_PLAYER_ID)
  206. {
  207. RemovePlayerAttachedObject(playerid, 2);
  208. DeletePVar(playerid, "braquageencours");
  209. format(string, sizeof(string), "[ROB]{FFFFFF} %s killed %s in full flight, so the bag fell.", GetName(killerid), GetName(playerid));
  210. SendClientMessageToAll(COLOR_BLUE, string);
  211. SendClientMessageToAll(COLOR_BLUE, "[ROB]{FFFFFF} Get the bag by clicking on ''Y''");
  212. GetPlayerPos(playerid, bInfo[posx], bInfo[posy], bInfo[posz]);
  213. bInfo[objetid] = CreateObject(1550, bInfo[posx], bInfo[posy], bInfo[posz]-0.5, 0.0, 0.0, 0.0);
  214. bInfo[texteid] = Create3DTextLabel("[ROB]\n{FFFFFF}Click ''Y'' to retrieve the bag", COLOR_BLUE, bInfo[posx], bInfo[posy], bInfo[posz], 40.0, 0, 0);
  215. }
  216. if(braquage == 1 && playerid == idbraqueur && killerid == INVALID_PLAYER_ID)
  217. {
  218. RemovePlayerAttachedObject(playerid, 2);
  219. DeletePVar(playerid, "braquageencours");
  220. format(string, sizeof(string), "[ROB]{FFFFFF} %s committed suicide, the bag fell.", GetName(playerid));
  221. SendClientMessageToAll(COLOR_BLUE, string);
  222. SendClientMessageToAll(COLOR_BLUE, "[ROB]{FFFFFF} Get the bag by clicking on ''Y''");
  223. GetPlayerPos(playerid, bInfo[posx], bInfo[posy], bInfo[posz]);
  224. bInfo[objetid] = CreateObject(1550, bInfo[posx]-0.5, bInfo[posy], bInfo[posz]-1.0, 0.0, 0.0, 0.0);
  225. bInfo[texteid] = Create3DTextLabel("[ROB]\n{FFFFFF}Click ''Y'' to retrieve the bag", COLOR_BLUE, bInfo[posx], bInfo[posy], bInfo[posz], 40.0, 0, 0);
  226. }
  227. }
  228. // =========================== [ SYSTEME DE KILL STREAKS ] ===========================
  229. if(killerid != INVALID_PLAYER_ID) {
  230. if(InWar[playerid] == 1 && InWar[killerid] == 1)
  231. {
  232. killstreaks[killerid]++;
  233. new string[MAX_STRING_MSG];
  234. if(killstreaks[killerid] == 3)
  235. {
  236. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 3 kills.", GetName(killerid));
  237. SendClientMessageToAll(COLOR_BLUE, string);
  238. }
  239. if(killstreaks[killerid] == 6)
  240. {
  241. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 6 kills.", GetName(killerid));
  242. SendClientMessageToAll(COLOR_BLUE, string);
  243. }
  244. if(killstreaks[killerid] == 9)
  245. {
  246. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 9 kills.", GetName(killerid));
  247. SendClientMessageToAll(COLOR_BLUE, string);
  248. }
  249. if(killstreaks[killerid] == 12)
  250. {
  251. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 12 kills.", GetName(killerid));
  252. SendClientMessageToAll(COLOR_BLUE, string);
  253. SendClientMessage(killerid, COLOR_BLUE, "[CARGAISON]{FFFFFF} Your cargo is now available, use /colis to make it appear.");
  254. PlayerInfo[killerid][addColis] = true;
  255. }
  256. if(killstreaks[killerid] == 15)
  257. {
  258. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 15 kills.", GetName(killerid));
  259. SendClientMessageToAll(COLOR_BLUE, string);
  260. }
  261. if(killstreaks[killerid] == 18)
  262. {
  263. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 18 kills.", GetName(killerid));
  264. SendClientMessageToAll(COLOR_BLUE, string);
  265. }
  266. if(killstreaks[killerid] == 21)
  267. {
  268. format(string, 108, "[KILLSTREAKS]{FFFFFF} %s is in series of killstreaks, he does a series of 21 kills.", GetName(killerid));
  269. SendClientMessageToAll(COLOR_BLUE, string);
  270. }
  271.  
  272. if(killstreaks[killerid] == 1)
  273. {
  274. //PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/lakj9wq71p/First_Blood.mp3");
  275. GameTextForPlayer(playerid, "~w~First Blood !", 1000, 5);
  276. }
  277. if(killstreaks[killerid] == 2)
  278. {
  279. //PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/0u0flkkx91/Double_Kill_.mp3");
  280. GameTextForPlayer(playerid, "~w~Double Kill !", 1000, 5);
  281. }
  282. if(killstreaks[killerid] == 3)
  283. {
  284. //PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/u6nculuz4n/Triple_Kill.mp3");
  285. GameTextForPlayer(playerid, "~w~Multi Kill !", 1000, 5);
  286. }
  287. if(killstreaks[killerid] == 4)
  288. {
  289. PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/x6r5w5hnsr/Multi-Kill_.mp3");
  290. }
  291. if(killstreaks[killerid] == 6)
  292. {
  293. PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/x6r5w5hnsr/Multi-Kill_.mp3");
  294. }
  295. if(killstreaks[killerid] == 9)
  296. {
  297. PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/4c57mh0z8b/MonsterKill.mp3");
  298. }
  299. if(killstreaks[killerid] == 12)
  300. {
  301. PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/aawon1316v/Rampage_.mp3");
  302. }
  303. if(killstreaks[killerid] == 15)
  304. {
  305. PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/57bpl86yy7/GODLIKE.mp3");
  306. }
  307. if(killstreaks[killerid] == 18)
  308. {
  309. PlayAudioStreamForPlayer(killerid, "http://k003.kiwi6.com/hotlink/uxz0mro651/HolyShit.mp3");
  310. }
  311. killstreaks[playerid] = 0; // Le joueur est mort, on reset ces killstreaks.
  312.  
  313. }
  314. }
  315. SendDeathMessage(killerid,playerid,reason);
  316. return 1;
  317. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement