#include <amxmodx>
#include <cstrike>
#include <amxmisc>
#define PLUGIN "Killer Bonus"
#define VERSION "0.1"
#define AUTHOR "def4u1t"
new killCount, checkPl[33];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "death", "a", "1>0")
new szMapName[32], i, szBadMaps[][] = {"35hp_", "1hp_", "awp_", "fy_", "aim_"}; get_mapname(szMapName, sizeof(szMapName));
for(i = 0; i < sizeof(szBadMaps); i++) if(containi(szMapName, szBadMaps[i]) != -1) pause("ad");
register_event("HLTV", "RoundNew", "a", "1=0", "2=0");
}
public RoundNew() {
killCount = 0;
for(new i; i < sizeof(checkPl); i++) checkPl[i] = false;
}
public death() {
if(checkPl[read_data(1)] == true || killCount >= 3 || is_user_alive(read_data(2)) || read_data(2) == read_data(1)) return;
new i_Killer = read_data(1)
checkPl[read_data(1)] = true
killCount++;
new k_name[32], v_name[32], money
get_user_name(i_Killer,k_name,31)
get_user_name(i_Victim,v_name,31)
switch(killCount) {
case 1: {
money = 300;
cs_set_user_money(i_Killer, cs_get_user_money(i_Killer) + money, 1);
ChatColor("^1[^4сервер^1] ^3%s^1 убил %n. Приз: ^4%d$", k_name, v_name, money);
}
case 2: {
money = 200;
cs_set_user_money(i_Killer, cs_get_user_money(i_Killer) + money, 1);
ChatColor("^1[^4сервер^1] ^3%s^1 убил %n. Приз: ^4%d$", k_name, v_name, money);
}
case 3: {
money = 100;
cs_set_user_money(i_Killer, cs_get_user_money(i_Killer) + money, 1);
ChatColor("^1[^4сервер^1] ^3%s^1 убил %n. Приз: ^4%d$", k_name, v_name, money);
}
}
}
stock ChatColor(const szMessage[], any:...)
{
static pnum, players[32], szMsg[190], IdMsg;
vformat(szMsg, charsmax(szMsg), szMessage, 2);
if(!IdMsg) IdMsg = get_user_msgid("SayText");
get_players(players, pnum, "c");
for(new i; i < pnum; i++)
{
message_begin(MSG_ONE_UNRELIABLE, IdMsg, .player = players[i]);
write_byte(players[i]);
write_string(szMsg);
message_end();
}
}