I want to make a speed boost that works both ground and air.
I want it to first get the current speed of the player, and then add a X amount to it (to look like it gets "boosted").
I dont wanna use Velocity by Aim, because like the title says, this needs to work while in Air (for example in Surf)
Full example: If the player is going forward (but its not in the ground), with X current speed, when he shoots he gets +10 speed added to his current speed, whiout changing his direction, i mean, where he aims doesnt effect anything.
I have tryied some methods.
Right now this is what i have:
PHP Code:
public forward_PreThink(id)
{
if(pev(id, pev_button) & IN_ATTACK)
{
new Float:CurrentVelocity[3], Float:FinalVelocity[3]
pev(id, pev_velocity, CurrentVelocity)
FinalVelocity[2] = CurrentVelocity[2] + 10
set_pev(id, pev_velocity, FinalVelocity)
}
}
And ofc it doesnt work correctly.
How can i fix it? Thank you.