Raised This Month: $ Target: $400
 0% 

Make player fly?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mix97mix
Member
Join Date: Sep 2011
Old 10-02-2011 , 10:31   Make player fly?
Reply With Quote #1

if(PlayerClassCT[id] == 2)
{
set_user_health(id, 1500)
give_item(id, "weapon_knife")
cs_set_user_model(id, "av_dragon")
set_user_gravity(id, 0.80)
set_user_rendering(id)
}

what should i add soo player can fly ?
video *LINK* : http://img837.**************/img837/4755/lwt.mp4
mix97mix is offline
Send a message via MSN to mix97mix Send a message via Skype™ to mix97mix
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-02-2011 , 11:22   Re: Make player fly?
Reply With Quote #2

Try this:
PHP Code:
set_user_gravity(id0.00
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 10-02-2011 , 11:51   Re: Make player fly?
Reply With Quote #3

set_user_gravity() doesn't really make him fly just jump higher or lower.
You'll have to set his movetype to FL_FLY in post or prethink, I think...
And that will probably cause some really high cpu usage :/
Erox902 is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 10-02-2011 , 11:51   Re: Make player fly?
Reply With Quote #4

PHP Code:
#include <amxmodx> 
#include <engine> 

#define PLUGIN "Fly" 
#define VERSION "1.0" 
#define AUTHOR "Stereo" 

public plugin_init() 
    
register_plugin(PLUGINVERSIONAUTHOR

public 
client_PreThink(id)  

    if( 
is_user_alive(id) ) 
    { 
        new 
Float:fAim[3]
        
VelocityByAim(id 250 fAim)
        
        if( !(
get_user_button(id) & IN_JUMP) ) 
            
set_user_velocity(idfAim)
    } 
    return 
PLUGIN_CONTINUE


Last edited by Stereo; 10-02-2011 at 11:59.
Stereo is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-02-2011 , 11:54   Re: Make player fly?
Reply With Quote #5

Quote:
Originally Posted by Stereo View Post
PHP Code:
#include <amxmodx>
#include <engine>


#define PLUGIN "Fly"
#define VERSION "1.0"
#define AUTHOR "Stereo"


public plugin_init()
    
register_plugin(PLUGINVERSIONAUTHOR)

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.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 10-02-2011 , 12:07   Re: Make player fly?
Reply With Quote #6

Just thought of another thing...
Since this is for an experience mod you'd probably want to make this a comand only avaivable for that class.
Cuz' you can't shoot straight when you're in the air and with this method you can accually never stop moving completly,
and no matter what weapon you'll always have 250 as maxspeed.
Erox902 is offline
Evaldas.Grigas
Senior Member
Join Date: Sep 2011
Location: Lithuania
Old 10-02-2011 , 15:20   Re: Make player fly?
Reply With Quote #7

Mhm search amxx parachute plugin and make it landing gravity 0. Tested and works great. You can fly.
Evaldas.Grigas is offline
Send a message via Skype™ to Evaldas.Grigas
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 10-02-2011 , 19:26   Re: Make player fly?
Reply With Quote #8

give the play noclip lol....
Doc-Holiday is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 10-03-2011 , 02:32   Re: Make player fly?
Reply With Quote #9

Quote:
Originally Posted by Doc-Holiday View Post
give the play noclip lol....
Noclip and flying is not the same
Erox902 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode