Advertisement
Dayrion

Untitled

Jun 1st, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.21 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.                 if(reason == 51 || reason == 53)
  14.                 {
  15.                     new string[120];
  16.                     format(string, sizeof(string), "[YES-51/53] Killer: %s (%d) | Killee: %s (%d) | Reason: %d",GetName(killerid),killerid,GetName(playerid),playerid,reason);
  17.                     SendClientMessageToAll(-1, string);
  18.                     killerid = i;
  19.                 }
  20.                 else
  21.                 {
  22.                     new string[120];
  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.                     return 1;
  26.                 }
  27.             }
  28.         }
  29.     }
  30.     return 1;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement