SHARE
TWEET

Untitled

mironovdga Apr 25th, 2020 (edited) 1,173 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. new _global_shotCount[MAX_PLAYERS];
  9. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  10. {
  11.     if(issuerid == INVALID_PLAYER_ID) return true;
  12.    
  13.     new
  14.         _local_string[128],
  15.         _local_name_playerid[MAX_PLAYER_NAME],
  16.         _local_name_issuerid[MAX_PLAYER_NAME];
  17.     new
  18.         _local_weaponname[24];
  19.    
  20.     GetPlayerName(playerid, _local_name_playerid, MAX_PLAYER_NAME);
  21.     GetPlayerName(issuerid, _local_name_issuerid, MAX_PLAYER_NAME);
  22.     GetWeaponName(weaponid, _local_weaponname, sizeof (_local_weaponname));
  23.    
  24.     if(weaponid == WEAPON_DEAGLE)
  25.     {
  26.         if(_global_shotCount[issuerid] >= 5)
  27.         {
  28.             foreach(Player, i)
  29.             {
  30.                 if(p_info[playerid][p_admin] < 1)
  31.                 {
  32.                
  33.                     format(_local_string, sizeof(_local_string),
  34.                     "Игрок %s[%d] атаковал игрока %s[%d] уже %d раз из %s",
  35.                     _local_name_issuerid, issuerid, _local_name_playerid,
  36.                     playerid, _global_shotCount[issuerid], _local_weaponname
  37.                     );
  38.                    
  39.                     SendClientMessage(i, 0xFFFFFFFF, _local_string);
  40.                 }
  41.             }
  42.         }
  43.         else _global_shotCount[issuerid]++;
  44.     }
  45.     return true;
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top