Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype)
- {
- if(attacker > 0 && victim > 0 && attacker <= MaxClients && victim <= MaxClients)
- {
- if(victim == g_iVictims[attacker] && playerInGame[attacker] && playerInGame[victim] && damage > 100.0)
- int money = playerbet[attacker];
- {
- int takemoney = money-playerbet[attacker]/100*10;
- CPrintToChatAll("{white}[{orange}Дуэли{white}] Игрок {orange}%N {chartreuse}выиграл в дуэли {white}против {orange}%N %d коинсов",attacker, victim, takemoney);
- Shop_GiveClientCredits(attacker, takemoney, CREDITS_BY_NATIVE);
- Shop_TakeClientCredits(victim, money);
- CPrintToChat(attacker, "{white}Вы получили {fullred}%d {white}коинсов за победу в дуэли", takemoney);
- CPrintToChat(victim, "{white}С вас снято %d коинсов за проигрыш в дуэли", money);
- client_weapon[attacker] = "weapon_knife";
- client_weapon[victim] = "weapon_knife";
- PlayerInMenu[attacker] = false;
- PlayerInMenu[victim] = false;
- delete_weapon(attacker, 0);
- delete_weapon(victim, 0);
- g_BeaconSerial[victim] = 0;
- g_BeaconSerial[attacker] = 0;
- playerbet[attacker] = 0;
- playerbet[victim] = 0;
- g_iVictims[attacker] = 0;
- g_iVictims[victim] = 0;
- playerInGame[attacker] = false;
- playerInGame[victim] = false;
- }
- return playerInGame[victim] && g_iVictims[victim] != attacker ? Plugin_Handled : Plugin_Continue;
- }
- return Plugin_Continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement