Is this the action id??
Code:
public fwdPlayerPreThink(id) {
if ( is_user_alive(id)) {
if( gOnLadder[id] ) {
new Float:velocity[3];
pev(id, pev_velocity, velocity);
if ( (pev(id, pev_button) & IN_FORWARD) && (velocity[0] == 0.0 || velocity[1] == 0.0) ) {
velocity[2] = 250.0;
set_pev(id, pev_velocity, velocity);
}
gOnLadder[id] = false;
}
new ent, body;
get_user_aiming(id, ent, body, 320);
if (isLadder(ent)) {
set_hudmessage(0, 25, 255, -1.0, -0.90, 0, 1.0, 1.0, 0.2, 0.2, 1);
show_hudmessage(id, "First In-Game Ladder.");
}
}
}
public fwdTouch(ent, id) {
if (is_user_alive(id) && isLadder(ent)) {
set_pev(id, pev_movetype, MOVETYPE_FLY);
gOnLadder[id] = true;
// Velocity way
new Float:velocity[3];
pev(id, pev_velocity, velocity);
if ( (pev(id, pev_button) & IN_FORWARD) && (velocity[0] == 0.0 || velocity[1] == 0.0) ) {
velocity[2] = 250.0;
set_pev(id, pev_velocity, velocity);
}
}
}