when i amx_off , everything turns right with my 32 slots custom zombie plague server, if not, 50 loss (sometimes) etc... i NEVER get ping
btw i suspect this is laging my clients
PHP Code:
public make_shield(const Float:vOrigin[3])
{
new i_Ent = engfunc(EngFunc_CreateNamedEntity,g_EntMine);
set_pev(i_Ent,pev_classname,"shield");
set_pev(i_Ent,pev_frame,0);
set_pev(i_Ent,pev_body,3);
// new Float:mins[3] = { -100.0, -100.0, -100.0 }, Float:maxs[3] = { 100.0, 100.0, 100.0 };
// fm_entity_set_size(i_Ent,mins,maxs)
// set_pev(i_Ent, pev_origin, vOrigin );
// fm_entity_set_origin(i_Ent, vOrigin)
engfunc( EngFunc_SetSize, i_Ent, {-30.0, -30.0, -40.0}, {30.0, 30.0, 40.0})
engfunc(EngFunc_SetModel,i_Ent,model_aura_shield);
engfunc( EngFunc_SetOrigin, i_Ent , vOrigin );
fm_set_rendering(i_Ent,kRenderFxGlowShell,255,255,255,kRenderTransAlpha,140)
set_task(10.3, "remove_shield", i_Ent)
set_pev(i_Ent,pev_solid,SOLID_BBOX);
}
btw, im using this together with a 0.1 settask
PHP Code:
public PushPlayer(const Float:center[3])
{
static client
for (client = 1; client <= g_maxplayers; client++)
{
new Float:origin[3];
pev(client, pev_origin, origin);
new Float:dist = get_distance_f(origin, center);
if( dist > PUSH_RADIUS ) continue;
if( !g_zombie[client] || g_nodamage[client] )
{
if (dist < PUSH_RADIUS - 20)
{
g_inaura[client] = true
fm_set_user_godmode(client, 1)
set_task(0.4, "remove_inaura", client)
}
}
if( !g_zombie[client] || g_nodamage[client] || g_nemesis[client] ) continue;
new Float:speed = (1.0 - (dist / PUSH_RADIUS)) * 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(client, pev_velocity, current);
current[0] += velocity[0];
current[1] += velocity[1];
current[2] += velocity[2];
set_pev(client, pev_velocity, current);
}
}