Mam problem z przerobieniem skryptu by blokowal dwie ostatnie snajperki w
CS i TT i zamiast odrazu zabijac to po strzale zeby zabieralo (powiedzmy ze 50hp) Daloby rade cos takiego zrobic??
Kod:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Slay when awp is shot"
#define AUTHOR "Styles - oRNY"
#define VERSION "1.0"
new pCvarOn
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_CmdStart, "Forward_CmdStart")
pCvarOn = register_cvar("styles_awpslay", "1")
}
public Forward_CmdStart(const id, const uc_handle, random_seed)
{
new team = get_user_team(id)
if(!get_pcvar_num(pCvarOn) || (team == 3) || !is_user_alive(id))
return FMRES_HANDLED
new dummy, weapon = get_user_weapon(id, dummy, dummy)
new iButtons = get_uc(uc_handle, UC_Buttons)
if((weapon == CSW_AWP) && (iButtons && IN_ATTACK))
{
client_print(id, print_chat, "[Awp Manager] You can not shoot the awp.")
user_kill(id, 1)
return FMRES_HANDLED
}
return FMRES_IGNORED
}