Not tested, basically same code as velocity_by_aim
PHP Code:
enum {
Move_Left,
Move_Right,
}
SideMove(id, Float:fSpeed, Float:vRetValue[3], iDirection)
{
new Float:fVecAngles[3], Float:fVecVright[3], Float:fVecVelocity[3]
pev(id, pev_angles, fVecAngles)
engfunc(EngFunc_MakeVectors, fVecAngles)
global_get(glb_v_right, fVecVright)
pev(id, pev_velocity, fVecVelocity)
if( iDirection == Move_Left )
{
fVecAngles[0] = -fVecAngles[0]
fVecAngles[1] = -fVecAngles[1]
}
fVecVelocity[0] = fVecAngles[0] * fSpeed
fVecVelocity[1] = fVecAngles[1] * fSpeed
fVecVelocity[2] = fSpeed
set_pev(id, pev_velocity, fVecVelocity)
}
__________________