This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

disable gravity for player (make him hover fly/float)


Post New Thread Reply   
 
Thread Tools Display Modes
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-26-2009 , 20:21   Re: disable gravity for player (make him hover fly/float)
Reply With Quote #21

Code:
set_pev(id, pev_gravity, 0.0001)
.... should do the trick....
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-27-2009 , 05:36   Re: disable gravity for player (make him hover fly/float)
Reply With Quote #22

Emp`
Yeah, I was about to come up with that solution, when one guy from another forum gave me link to this thread http://forums.alliedmods.net/showthr..._by_aim&page=3 and that's EXACTLY what i need )

Thanks everyone! +karma!



BOYSplayCS

You are the only idiot in this thread -.-


/thread
__________________


Last edited by SonicSonedit; 03-27-2009 at 11:44.
SonicSonedit is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-27-2009 , 12:47   Re: [solved] disable gravity for player (make him hover fly/float)
Reply With Quote #23

No, forget it, set_pev(id, pev_movetype, MOVETYPE_FLY); doesn't work.
Looks like set_pev(id, pev_gravity, 0.0001) is the only way to solve it.
__________________

SonicSonedit is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-27-2009 , 15:37   Re: [solved] disable gravity for player (make him hover fly/float)
Reply With Quote #24

MOVETYPE_FLY does work. You have to set it in every client PreThink.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 03-27-2009 , 16:13   Re: [solved] disable gravity for player (make him hover fly/float)
Reply With Quote #25

Quote:
MOVETYPE_FLY does work. You have to set it in every client PreThink.
Well, i did and it didn't work for me.

Anyway, here is a .sma, if MOVETYPE_FLY works, why do you fall when flying forward/backward/left/right?
why do you fall when button == attack1 ?
why do you fall when set_pev(id, pev_velocity, velocity) was not executed?

if set_pev(id, pev_movetype, MOVETYPE_FLY) works, it's wouldn't happen, because set_pev(id, pev_movetype, MOVETYPE_FLY) goes before return.
Attached Files
File Type: sma Get Plugin or Get Source (zp_magician.sma - 346 views - 8.6 KB)
File Type: zip cstrike.zip (1.64 MB, 67 views)
__________________


Last edited by SonicSonedit; 03-27-2009 at 16:21.
SonicSonedit 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 18:24.


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