18/02/2019, 07:58 AM
(Última modificación: 18/02/2019, 07:59 AM por Reverant. Edited 1 time in total.)
Utilizo amx 1.10
Esta es la guía: https://amxmodx-es.com/Thread-Gu%C3%ADa-Pipe-bomb
Esta es la guía: https://amxmodx-es.com/Thread-Gu%C3%ADa-Pipe-bomb
Código PHP:
public hook(entity)
{
if (!pev_valid(entity))
{
remove_task(entity)
return
}
emit_sound(entity, CHAN_WEAPON, g_sound, 1.0, ATTN_NORM, 0, PITCH_HIGH);
static Float:entOrigin[3], flOrigin[3], PlayerPos[3], distance
pev(entity, pev_origin, entOrigin);
flOrigin[0] = floatround(entOrigin[0])
flOrigin[1] = floatround(entOrigin[1])
flOrigin[2] = floatround(entOrigin[2])
for (new i = 1; i <= g_maxplayers; i++)
{
if(!is_user_alive(i) || !g_zombie[i])
continue
get_user_origin(i, PlayerPos)
distance = get_distance(PlayerPos, flOrigin)
if (distance <= get_pcvar_num(cvar_radius))
{
new Float:fl_Velocity[3]
if (distance > 25)
{
new Float:fl_Time = distance / 650.0
fl_Velocity[0] = (flOrigin[0] - PlayerPos[0]) / fl_Time
fl_Velocity[1] = (flOrigin[1] - PlayerPos[1]) / fl_Time
fl_Velocity[2] = (flOrigin[2] - PlayerPos[2]) / fl_Time
}
else
{
fl_Velocity[0] = 0.0
fl_Velocity[1] = 0.0
fl_Velocity[2] = 0.0
}
entity_set_vector(i, EV_VEC_velocity, fl_Velocity)
}
}
}
Cita:entity_set_vector(i, EV_VEC_velocity, fl_Velocity)
Cita:Error: Undefined symbol "entity_set_vector" on line 14075
Warning: Expression has no effect on line 14075
Error: Expected token: ";", but found ")" on line 14075
Error: Invalid expression, assumed zero on line 14075
Error: Too many error messages on one line on line 14075