Alguém saberia oque está errado nesse plugin, quando eu vou tentar compilar ele aparece esse erro aqui que me deixa Puto da vida:zplague:
Imagem:
Para quem Souber arrumar a Sma ta aqui :)
Imagem:
Para quem Souber arrumar a Sma ta aqui :)
Código:
#include <hamsandwich>
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <zombieplague>
#define PLUGIN "[ZP] Drop APs Random Mode"
#define VERSION "1.0"
#define AUTHOR "GuhRDS"
new const item_class_name[] = "dm_item"
new g_model[][] = { "models/galinha.mdl" }
new g_sound[] = { "kdfnfsdf.wav" }
new cvar_mode
public plugin_precache()
{
for (new i = 0; i < sizeof g_model; i++)
precache_model(g_model[i])
precache_sound(g_sound)
}
public plugin_init()
{
// Register Plugin
register_plugin(PLUGIN, VERSION, AUTHOR)
// Cvars
cvar_mode = register_cvar("zp_drop_apmode", "4") // 0 - Desativado | 1 - Difícil | 2 - Médio(Balanceado) | 3 - Fácil | 4 - Sempre
cvar_mode = register_cvar("zp_drop_apmode_speed_fly", "800") // Velocidade de Voo
// Others
register_event("HLTV", "round_start", "a", "1=0", "2=0")
register_forward(FM_Touch, "fwd_Touch")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
}
public plugin_cfg()
{
new cfgdir[32]
get_configsdir(cfgdir, charsmax(cfgdir))
server_cmd("exec %s/zp_drop_ap.cfg", cfgdir)
}
public round_start()
{
new ent = FM_NULLENT
static string_class[] = "classname"
while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name)))
set_pev(ent, pev_flags, FL_KILLME)
}
public client_PreThink(id)
{
new Float:fAim[3] , Float:fVelocity[3];
VelocityByAim(id , get_pcvar_num(cvar_apmode_speed) , fAim);
{
fVelocity[0] = fAim[0];
fVelocity[1] = fAim[1];
fVelocity[2] = fAim[2];
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (TE_BEAMFOLLOW)
write_short (id)
write_short (gTrail)
write_byte (2)
write_byte (10)
write_byte (255)
write_byte (69)
write_byte (0)
write_byte (220)
message_end()
set_user_velocity(fVelocity);
}
return PLUGIN_CONTINUE;
}
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, item_class_name))
return FMRES_IGNORED
give_item(toucher)
emit_sound(toucher, CHAN_AUTO, g_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
set_pev(touched, pev_effects, EF_NODRAW)
set_pev(touched, pev_solid, SOLID_NOT)
return FMRES_IGNORED
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
if (!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
return HAM_IGNORED
// Desativado
if((get_pcvar_num(cvar_mode) == 0))
{
new random = random_num(1, 2)
if (random == 0)
{
new origin[3]
get_user_origin(victim, origin, 0)
addItem(origin)
}
}
// Difícil
if((get_pcvar_num(cvar_mode) == 1))
{
new random = random_num(0, 9)
if (random == 0 || random == 1 || random == 2 || random == 3 || random == 4)
{
new origin[3]
get_user_origin(victim, origin, 0)
addItem(origin)
}
}
// Médio(Balanceado)
if((get_pcvar_num(cvar_mode) == 2))
{
new random = random_num(0, 8)
if (random == 0 || random == 1 || random == 2 || random == 3 || random == 4)
{
new origin[3]
get_user_origin(victim, origin, 0)
addItem(origin)
}
}
// Fácil
if((get_pcvar_num(cvar_mode) == 3))
{
new random = random_num(0, 6)
if (random == 0 || random == 1 || random == 2 || random == 3 || random == 4)
{
new origin[3]
get_user_origin(victim, origin, 0)
addItem(origin)
}
}
// Sempre
if((get_pcvar_num(cvar_mode) == 4))
{
new random = random_num(0, 4)
if (random == 0 || random == 1 || random == 2 || random == 3 || random == 4)
{
new origin[3]
get_user_origin(victim, origin, 0)
addItem(origin)
}
}
return HAM_IGNORED
}
public removeEntity(ent)
{
if (pev_valid(ent))
engfunc(EngFunc_RemoveEntity, ent)
}
public addItem(origin[3])
{
new ent = fm_create_entity("info_target")
set_pev(ent, pev_classname, item_class_name)
engfunc(EngFunc_SetModel,ent, g_model[random_num(0, sizeof g_model - 1)])
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_FLY)
//set_pev(ent, pev_movetype, MOVETYPE_TOSS)
new Float:fOrigin[3]
origin[2]-=7
IVecFVec(origin, fOrigin)
set_pev(ent, pev_origin, fOrigin)
set_pev(ent, pev_renderfx, kRenderFxGlowShell)
switch(random_num(5, 5))
{
case 0: set_pev(ent, pev_rendercolor, Float:{0.0, 0.0, 255.0}) // Azul
case 1: set_pev(ent, pev_rendercolor, Float:{0.0, 255.0, 0.0}) // Verde
case 2: set_pev(ent, pev_rendercolor, Float:{255.0, 0.0, 0.0}) // Vermelho
case 3: set_pev(ent, pev_rendercolor, Float:{255.0, 0.0, 255.0}) // Rosa
case 4: set_pev(ent, pev_rendercolor, Float:{255.0, 255.0, 0.0}) // Amarelo
case 5: set_pev(ent, pev_rendercolor, Float:{255.0, 255.0, 255.0}) // Branco
}
}
public give_item(id)
{
zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 4)
fm_set_user_health(id, get_user_health(id) + 100)
client_printcolor(id, "!y[!gZP!y] Voce pegou o !tBonequinho !ye !tGanhou !g2 !tAmmo Pack(s)!y.")
}
stock get_configsdir(name[], len)
{
return get_localinfo("amxx_configsdir", name, len);
}
stock client_printcolor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Chat Verde
replace_all(msg, 190, "!y", "^1") // Chat Normal
replace_all(msg, 190, "!t", "^3") // Chat Do Time Tr=Vermelho Ct=Azul Spec=Branco
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}