Advertisement
Dayrion

letsgo

Jun 1st, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.29 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3.     if(killerid == INVALID_PLAYER_ID)
  4.     {
  5.         foreach(new i : Player)
  6.         {
  7.             SendClientMessageToAll(-1, "Foreach loop ...");
  8.             for(new j = 0; j < 6; j++)
  9.             {
  10.                 SendClientMessageToAll(-1, "For every player's bomb loop... Player In range of the bomb ?");
  11.                 if(!IsPlayerInRangeOfPoint(playerid, 10.0, pInfo[i][C4X][j], pInfo[i][C4Y][j], pInfo[i][C4Z][j]) continue;
  12.                 SendClientMessageToAll(-1, "Player in range checking reason of the death...");
  13.                 new string[120];
  14.                 format(string, sizeof(string), "i = %i | j = %i |", i, j);
  15.                 if(reason == 51 || reason == 53)
  16.                 {
  17.                     format(string, sizeof(string), "[YES-51/53] Killer: %s (%d) | Killee: %s (%d) | Reason: %d",GetName(killerid),killerid,GetName(playerid),playerid,reason);
  18.                     SendClientMessageToAll(-1, string);
  19.                     killerid = i;
  20.                 }
  21.                 else
  22.                 {
  23.                     format(string, sizeof(string), "[NO-51/53] Killer: %s (%d) | Killee: %s (%d) | Reason: %d",GetName(killerid),killerid,GetName(playerid),playerid,reason);
  24.                     SendClientMessageToAll(-1, string);
  25.                     SendDeathMessage(i, playerid, 51);
  26.                     return 1;
  27.                 }
  28.             }
  29.         }
  30.     }
  31.     return 1;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement