Quote:
Originally Posted by Stereo
PHP Code:
#include <amxmodx>
#include <engine>
#define PLUGIN "Fly"
#define VERSION "1.0"
#define AUTHOR "Stereo"
public plugin_init()
register_plugin(PLUGIN, VERSION, AUTHOR)
public client_PreThink(id)
{
if( is_user_alive(id) )
{
new Float:fAim[3] , Float:fVelocity[3];
VelocityByAim(id , 250 , fAim);
if(!(get_user_button(id) & IN_JUMP))
{
fVelocity[0] = fAim[0];
fVelocity[1] = fAim[1];
fVelocity[2] = fAim[2];
set_user_velocity(id , fVelocity);
}
}
return PLUGIN_CONTINUE;
}
|
Why do you create another variable fVelocity, if you are just copying fAim into it later? You don't need it.
Also, the float should be declared as static instead of new.
__________________