undeadc0re
Пользователь
- Регистрация
- 26 Июн 2019
- Сообщения
- 2
- Симпатии
- 0
Суть в том, чтобы заменить денежный бонус на выдачу флага доступа на определенный срок
Код:
][/B][/B]
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Admin Slaughter Reward"
#define VERSION "1.0"
#define AUTHOR "BOYSplayCS"
#define AdminKilled ADMIN_KICK
new Reward
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "Event_Death", "a", "1 > 0")
Reward = register_cvar("amx_adminkill_reward", "300")
}
public Event_Death()
{
new Killer = read_data(1)
new Victim = read_data(2)
if ((Killer == Victim) || !(get_user_flags(Victim) & AdminKilled) || (get_user_team(Victim) == get_user_team(Killer)))
return PLUGIN_CONTINUE
new CheckWeapon[6];
read_data(4, CheckWeapon, 5);
if (equal(CheckWeapon, "knife"))
{
new KillReward = get_pcvar_num(Reward)
cs_set_user_money(Killer, clamp(cs_get_user_money(Killer) + KillReward, 0, 16000))
client_print(Killer, print_chat, "[AMXX] You have slaughtered an admin! You have been awarded an extra %s dollars!", KillReward)
}
return PLUGIN_HANDLED
}
[B]