- Código:
Error: Undefined symbol "RegisterHam" on line 25
Warning: Expression has no effect on line 25
Warning: Expression has no effect on line 25
Error: Expected token: ";", but found ")" on line 25
Error: Invalid expression, assumed zero on line 25
Error: Too many error messages on one line on line 25
As linhas são:
- Código:
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
O código do plugin é esse:
- Código:
#include <amxmodx>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>
#define PLUGIN "[ZP] Dropar Ovos"
#define VERSION "1.0"
#define AUTHOR "Neukasano | Wilian"
new cvar_ap
new model[] = "models/Hwk/ZP2014/ovo.mdl"
public plugin_precache()
{
precache_model(model)
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_forward(FM_Touch, "fwd_Touch")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
cvar_ap = register_cvar("zp_give_ovo", "2")
}
public event_round_start()
{
new ent = FM_NULLENT
static string_class[] = "classname"
while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, "ammo")))
set_pev(ent, pev_flags, FL_KILLME)
}
public fwd_Touch(toucher, touched)
{
if (!is_user_alive(toucher) || !pev_valid(touched))
return FMRES_IGNORED
new classname[32]
pev(touched, pev_classname, classname, 31)
if (!equal(classname, "ammo"))
return FMRES_IGNORED
zp_set_user_ammo_packs(toucher, zp_get_user_ammo_packs(toucher) + get_pcvar_num(cvar_ap))
client_print(toucher, print_chat, "[Hawk's GaMes] Voce pegou um ovo e Ganhou 2 Ammo Pack(s).")
set_pev(touched, pev_effects, EF_NODRAW)
set_pev(touched, pev_solid, SOLID_NOT)
return FMRES_IGNORED
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
new origin[3]
get_user_origin(victim , origin)
addItem(origin)
}
public addItem(origin[3])
{
new ent = fm_create_entity("info_target")
set_pev(ent, pev_classname, "ammo")
engfunc(EngFunc_SetModel,ent, model)
set_pev(ent, pev_mins, Float:{-10.0,-10.0,0.0})
set_pev(ent, pev_maxs, Float:{10.0,10.0,25.0})
set_pev(ent, pev_size, Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
engfunc(EngFunc_SetSize, ent, Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})
set_pev(ent, pev_solid, SOLID_BBOX)
set_pev(ent, pev_movetype, MOVETYPE_TOSS)
new Float:fOrigin[3]
IVecFVec(origin, fOrigin)
set_pev(ent, pev_origin, fOrigin)
set_pev(ent,pev_renderfx,kRenderFxGlowShell)
set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
new Float:velocity[3];
pev(ent, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(ent, pev_velocity, velocity)
}