kasza a ja dodalem cos takiego lecz niemoge dac kompilacji mzoesz zerknac ?
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define ACCESS ADMIN_LEVEL_F
#if cellbits == 32
#define OFFSET_CSMONEY 115
#else
#define OFFSET_CSMONEY 140
#endif
#define OFFSET_LINUX 5
new bool:have_access[33] = false
new hudchannel, msgmoney
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
public plugin_init()
health_add = register_cvar("amx_vip_hp", "5")
health_hs_add = register_cvar("amx_vip_hp_hs", "10")
health_max = register_cvar("amx_vip_max_hp", "150")
{
register_event("DeathMsg","death_msg","a")
register_logevent("logevent_Round_Start", 2, "1=Round_Start");
register_event("DeathMsg", "hook_death", "a", "1>0")
register_clcmd("say /vip", "client_say")
register_clcmd("say_team /vip", "client_say")
hudchannel = CreateHudSyncObj()
msgmoney = get_user_msgid("Money")
}
public client_authorized(id)
{
if(get_user_flags(id) & ACCESS)
{
have_access[id] = true
}
}
public client_spawn(id)
{
if(have_access[id])
{
fm_give_item(id, "weapon_hegrenade");
fm_give_item(id, "weapon_smokegrenade");
fm_give_item(id, "item_kevlar");
}
}
public client_death()
{
static killer
killer = read_data(1)
if(is_user_connected(killer) && have_access[killer])
{
static headshot
headshot = read_data(3)
(headshot) ? stuff(killer, true) : stuff(killer, false)
}
}
public client_say(id)
{
show_motd(id, "vip.txt", "Lista VIPow")
}
stock stuff(player, bool:headshot)
{
static money, newmoney
money = fm_get_user_money(player)
newmoney = (headshot) ? 400 : 300
fm_set_user_money(player, money + newmoney, 1)
}
stock fm_set_user_money(id, money, flash)
{
set_pdata_int(id, OFFSET_CSMONEY, money, OFFSET_LINUX)
message_begin(MSG_ONE, msgmoney, {0,0,0}, id)
write_long(money)
write_byte(flash)
message_end()
}
stock fm_get_user_money(index)
{
return get_pdata_int(index, OFFSET_CSMONEY, OFFSET_LINUX)
}
public hook_death()
{
// Killer id
nKiller = read_data(1)
if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
nHp_add = get_pcvar_num (health_hs_add)
}
else
nHp_add = get_pcvar_num (health_add)
nHp_max = get_pcvar_num (health_max)
// Updating Killer HP
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_F))
return;
nKiller_hp = get_user_health(nKiller)
nKiller_hp += nHp_add
// Maximum HP check
if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
set_user_health(nKiller, nKiller_hp)
// Hud message "Healed +5/+10 hp"
set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
show_hudmessage(nKiller, "Healed +%d hp", nHp_add)
// Screen fading
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()
}