Hello, can anyone make that for this here only:
#define ADMIN_MAP (1<<5) /* flag "f" */
That would be great
Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <fakemeta_util>
#define PA_LOW 25.0
#define PA_HIGH 50.0
new g_antidotegun;
new g_hasantidotegun[33];
new PCVAR_STATUS;
new const CVAR_STATUS[] = "zp_antidotegun_on";
public plugin_init()
{
register_plugin("[ZP] AntiDote Gun", "1.0", "=)");
register_event("Damage", "event_Damage", "b", "2>0");
register_event("HLTV","event_new_round", "a","1=0", "2=0");
PCVAR_STATUS = register_cvar(CVAR_STATUS, "1");
g_antidotegun = zp_register_extra_item("AntiDote Gun" ,15 , ZP_TEAM_HUMAN);
}
public zp_extra_item_selected(player, itemid)
{
if ( itemid == g_antidotegun )
{
g_hasantidotegun[player] = 1
fm_give_item(player, "weapon_scout")
}
}
public event_Damage(id)
{
if(get_pcvar_num(PCVAR_STATUS) <= 0 || !is_user_alive(id) || is_user_bot(id))
return PLUGIN_CONTINUE;
new iWeapID, attacker = get_user_attacker(id, iWeapID);
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE;
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
if(!g_hasantidotegun[attacker])
return PLUGIN_CONTINUE;
if(iWeapID == CSW_SCOUT)
{
zp_disinfect_user(id)
}
return PLUGIN_CONTINUE;
}
public event_new_round() {
for(new i = 0; i < 32; i++)
{
g_hasantidotegun[i] = 0
}
}