I am getting tag mismatch on the set_task
PHP Code:
public PushPlayer(const Float:center[3])
{
// Collisions
static victim
victim = -1
new Float: configsforshield[4]
configsforshield[0] = center[0]
configsforshield[1] = center[1]
configsforshield[2] = center[2]
while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, center, NADE_EXPLOSION_RADIUS - 100)) != 0)
{
if (!g_zombie[victim])
return
new Float:origin[3];
pev(victim, pev_origin, origin);
new Float:speed = PUSH_SPEED;
new Float:velocity[3];
velocity[0] = origin[0] - center[0];
velocity[1] = origin[1] - center[1];
velocity[2] = origin[2] - center[2];
new Float:length = vector_length(velocity);
velocity[0] = velocity[0] / length * speed;
velocity[1] = velocity[1] / length * speed;
velocity[2] = velocity[2] / length * speed;
new Float:current[3];
pev(victim, pev_velocity, current);
current[0] += velocity[0];
current[1] += velocity[1];
current[2] += velocity[2];
set_pev(victim, pev_velocity, current);
}
set_task(0.2,"PushPlayer2", 0, configsforshield,3, "a", 25);
}
public PushPlayer2(Float: configforshield[4])
{
// Collisions
static victim
victim = -1
static Float: center[4]
center[0] = configforshield[0]
center[1] = configforshield[1]
center[2] = configforshield[2]
while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, center, NADE_EXPLOSION_RADIUS - 100)) != 0)
{
if (!g_zombie[victim])
return
new Float:origin[3];
pev(victim, pev_origin, origin);
new Float:speed = PUSH_SPEED;
new Float:velocity[3];
velocity[0] = origin[0] - center[0];
velocity[1] = origin[1] - center[1];
velocity[2] = origin[2] - center[2];
new Float:length = vector_length(velocity);
velocity[0] = velocity[0] / length * speed;
velocity[1] = velocity[1] / length * speed;
velocity[2] = velocity[2] / length * speed;
new Float:current[3];
pev(victim, pev_velocity, current);
current[0] += velocity[0];
current[1] += velocity[1];
current[2] += velocity[2];
set_pev(victim, pev_velocity, current);
}
}