Hi, help me pls)
My code:
PHP Code:
//
Plugin init:
register_touch("worldspawn", "ent_creeper", "touch_wall");
register_touch("func_brush", "ent_creeper", "touch_wall");
register_touch("func_breakable", "ent_creeper", "touch_wall");
//
public touch_wall(entity, client)
{
if(g_client_jumpdelay[client] < get_gametime())
{
g_client_jumpdelay[client] = (get_gametime() + 1.0)
new Float:client_origin[3], Float:client_angle[3];
pev(client, pev_origin, client_origin);
client_origin[2] -= 36.0;
pev(client, pev_v_angle, client_angle);
new Float:futur_origin[3];
origin_infront(client_angle, client_origin, 17.0, futur_origin);
new trace_handle = create_tr2();
engfunc(EngFunc_TraceLine, client_origin, futur_origin, DONT_IGNORE_MONSTERS, client, trace_handle);
get_tr2(trace_handle, TR_vecEndPos, futur_origin);
if(get_distance_f(client_origin, futur_origin) <= 17.0)
{
engfunc(EngFunc_MakeVectors, client_angle);
new Float:forward_vector[3];
get_global_vector(GL_v_forward, forward_vector);
client_angle[0] = forward_vector[0] * 200.0;
client_angle[1] = forward_vector[1] * 200.0;
client_angle[2] = 220.0;
set_pev(client, pev_velocity, client_angle);
g_bDrop = true;
set_task(0.2,"task_on");
}
}
}