PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "VIP HS MONEY"
#define VERSION "1.0"
#define AUTHOR "Dunn0"
new mpd, mkb, mhb, maxplayers
#define VIP_LEVEL ADMIN_LEVEL_H
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
mpd = register_cvar("money_per_damage","0")
mkb = register_cvar("money_kill_bonus","0")
mhb = register_cvar("money_hs_bonus","20")
maxplayers = get_maxplayers()
register_event("Damage","Damage","b")
register_event("DeathMsg", "event_death", "a")
}
public Damage(id)
{
new attacker = get_user_attacker(id,weapon,hitpoint)
if(! (0 < attacker<=maxplayers && is_user_alive(attacker) && attacker!=id) )
return PLUGIN_HANDLED
if (get_user_flags(attacker) & VIP_LEVEL)
{
new money = read_data(2) * get_pcvar_num(mpd)
if(read_data(3) & HIT_HEAD) money += get_pcvar_num(mhb)
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
}
return PLUGIN_HANDLED
}
public event_death()
{
new attacker = read_data(1)
new victim = read_data(2)
if(! (0 < victim <= maxplayers && victim != attacker) )
return PLUGIN_HANDLED
if (get_user_flags(attacker) & VIP_LEVEL)
{
new money = get_pcvar_num(mkb)
if(read_data(3) ) money += get_pcvar_num(mhb)
cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
}
return PLUGIN_HANDLED
}
i edited his code to remove the specified errors, and any other runtime errors i thought might occur.
I also gave you a define to set how you determine VIP. just change VIP_LEVEL value to w/e.
__________________