Klasę zrobiłem z pomocą mojego kolegi Fortress.
To dodajemy Przed public plugin_init()
new Float:g_wallorigin[33][3];
To dodajemy Do public plugin_init()
register_forward(FM_Touch, "fwd_touch");
To dodajemy na koniec sma (i zmieniamy nazwaklasy na jaka klase)
public fwd_touch(id, world) { if(!is_user_alive(id) || klasa_gracza[id] != nazwaklasy)//tu return FMRES_IGNORED; new classname[32]; entity_get_string(world, EV_SZ_classname, classname, 31); if(equal(classname, "worldspawn") || equal(classname, "func_wall") || equal(classname, "func_breakable")) entity_get_vector(id, EV_VEC_origin, g_wallorigin[id]); return FMRES_IGNORED; } public client_PreThink(id) { new button = get_user_button(id); if(button & IN_USE && klasa_gracza[id] == nazwaklasy)//tu { static Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin); if(get_distance_f(origin, g_wallorigin[id]) > 25.0) return FMRES_IGNORED; if(get_entity_flags(id) & FL_ONGROUND) return FMRES_IGNORED; if(button & IN_FORWARD) { static Float:velocity[3]; velocity_by_aim(id, 240, velocity); entity_set_vector(id, EV_VEC_velocity, velocity); } else if(button & IN_BACK) { static Float:velocity[3]; velocity_by_aim(id, -240, velocity); entity_set_vector(id, EV_VEC_velocity, velocity); } } return FMRES_IGNORED; }