Can you edit this code? It should function like a hook plugin, for example, with a command like bind c +fly
And if it's not too much trouble for you, could you also add amx_givefly and amx_takefly features? The fly ability given to the player should be permanent and should not be removed when they leave the server.
thank you
Code:
public client_PreThink(id)
{
if( is_user_alive(id) )
{
new Float:fAim[3]
VelocityByAim(id , 500, fAim)
if( !(get_user_button(id) & IN_JUMP) )
set_user_velocity(id, fAim)
}
return PLUGIN_CONTINUE
}