Advertisement
BM_R1KO

Untitled

Jul 5th, 2017
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype)
  2. {
  3.     if(attacker > 0 && victim > 0 && attacker <= MaxClients && victim <= MaxClients)
  4.     {
  5.         if(victim == g_iVictims[attacker] && playerInGame[attacker] && playerInGame[victim] && damage > 100.0)
  6.         int money = playerbet[attacker];    
  7.         {
  8.             int takemoney = money-playerbet[attacker]/100*10;  
  9.             CPrintToChatAll("{white}[{orange}Дуэли{white}] Игрок {orange}%N {chartreuse}выиграл в дуэли {white}против {orange}%N %d коинсов",attacker, victim, takemoney);    
  10.             Shop_GiveClientCredits(attacker, takemoney, CREDITS_BY_NATIVE);
  11.             Shop_TakeClientCredits(victim, money);
  12.             CPrintToChat(attacker, "{white}Вы получили {fullred}%d {white}коинсов за победу в дуэли", takemoney);
  13.             CPrintToChat(victim, "{white}С вас снято %d коинсов за проигрыш в дуэли", money);
  14.             client_weapon[attacker] = "weapon_knife";
  15.             client_weapon[victim] = "weapon_knife";
  16.             PlayerInMenu[attacker] = false;  
  17.             PlayerInMenu[victim] = false;    
  18.             delete_weapon(attacker, 0);
  19.             delete_weapon(victim, 0);
  20.             g_BeaconSerial[victim] = 0;
  21.             g_BeaconSerial[attacker] = 0;
  22.             playerbet[attacker] = 0;
  23.             playerbet[victim] = 0;
  24.             g_iVictims[attacker] = 0;
  25.             g_iVictims[victim] = 0;
  26.             playerInGame[attacker] = false;
  27.             playerInGame[victim] = false;
  28.         }
  29.         return playerInGame[victim] && g_iVictims[victim] != attacker ? Plugin_Handled : Plugin_Continue;
  30.     }
  31.     return Plugin_Continue;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement