Spoiler
#pragma semicolon 0
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Nowy Plugin"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
new bool:mozna = true;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_PlayerPreThink, "PlayerPreThink")
register_forward(FM_UpdateClientData, "UpdateClientData_Post", 1)
register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0")
}
public Nowa_Runda()
{
mozna = false;
set_task(15.0,"odblokuj",666)
}
public odblokuj()
{
mozna = true;
}
public PlayerPreThink(id)
{
if(!is_user_alive(id) || mozna)
{
return FMRES_IGNORED
}
if(get_user_weapon(id) != CSW_HEGRENADE)
{
return FMRES_IGNORED
}
set_pev(id, pev_button, pev(id,pev_button) & ~IN_ATTACK)
set_pev(id, pev_button, pev(id,pev_button) & ~IN_ATTACK2)
return FMRES_HANDLED
}
public UpdateClientData_Post(id, sendweapons, cd_handle)
{
if(!is_user_alive(id) || mozna)
{
return FMRES_IGNORED
}
if(get_user_weapon(id) != CSW_HEGRENADE)
{
return FMRES_IGNORED
}
set_cd(cd_handle, CD_ID, 0)
return FMRES_HANDLED
}