I didn't give a detailed explanation because I made the assumption you AREN'T stupid and could figure out what I meant. This should work for you fine. the *A* means you are going to have to figure out how to classify your entity since it probably wont be func_wall. You have cvars for how fast (speed), how high you want them (speed_height) and how long you want the boost to last (speed_time).
Code:
#include <amxmodx>
#include <fakemeta>
new bool:touchENT[33], bool:canSpeed[33];
new Float:veloc1[33][3],Float:veloc2[33][3];
public plugin_init() {
register_plugin("Boost", "1.0", "Skittles");
register_forward(FM_PlayerPreThink, "FM_pthink");
register_forward(FM_Touch, "FM_tch");
register_cvar("speed_height", "100.0");
register_cvar("speed", "1000");
register_cvar("speed_time", "1.0");
}
public waiter(id) {
touchENT[id] = false;
canSpeed[id] = true;
set_task(get_cvar_float("speed_time"), "speedOFF", id);
}
public speedOFF(id) {
canSpeed[id] = false;
}
public FM_pthink(id) {
if(is_user_alive(id) && !is_user_bot(id)) {
if(touchENT[id]) {
waiter(id);
}
if(canSpeed[id]) {
client_cmd(id, "+jump;wait;-jump");
pev(id, pev_velocity, veloc1[id]);
velocity_by_aim(id, get_cvar_num("speed"), veloc2[id]);
veloc2[id][2] = get_cvar_float("speed_height");
set_pev(id, pev_velocity, veloc2[id])
}
}
}
public FM_tch(id, Touched) {
if(is_user_alive(id)) {
new class1[32];
pev(Touched, pev_classname, class1, 31);
if(equal(class1, "func_wall")) { //*A*
touchENT[id] = true;
}
}
}
If you want the height to just be normal jump height just remove the speed_height cvar in plugin_init and change
Code:
veloc2[id][2] = get_cvar_float("speed_height");
to
Code:
veloc2[id][2] = veloc1[id][2];