Code:
public bhop(id, level, cid) { /*turning plugin on or off */
new cmd[32]
read_argv(1, cmd, 31)
remove_quotes(cmd)
if(equali(cmd, "pass1") ) { /* if they don't have amx_12345 "pass1" its off */
bhopon = true;
}
else {
bhopon = false;
}
}
Should fix 3..
You were reading argv 0 (the original command). Argv 1 is the first additional parameter (the password in your case)
And I think I've partially got number 2. Not really sure if this stock is the easiest way to go. Will think about it later
Code:
public SetJumpDistance(id)
{
new Float:JumpDistance = tuna formula
new Float:fOrigin[3],Float:fSpeed,Float:fvelocity[3]
pev(id,pev_speed,fSpeed)
//Fine the origin of a poiny JumpDistance away from you (umm.. forgotten..)
velocity_to_point(id, fOrigin, fSpeed, fVelocity)
set_pev(id,pev_velocity,fVelocity)
}
/* p34nut's stock */
stock velocity_to_point(id, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3])
{
if (!is_user_connected(id))
return 0;
static Float:fUserOrigin[3], Float:fDist;
pev(id, pev_origin, fUserOrigin);
fDist = vector_distance(fOrigin, fUserOrigin);
fVelocity[0] = (fOrigin[0] - fUserOrigin[0]) * (2.0 * fSpeed) / fDist;
fVelocity[1] = (fOrigin[1] - fUserOrigin[1]) * (2.0 * fSpeed) / fDist;
fVelocity[2] = (fOrigin[2] - fUserOrigin[2]) * (2.0 * fSpeed) / fDist;
return 1;
}