Raised This Month: $ Target: $400
 0% 

Keeping player in air


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ced
Member
Join Date: Oct 2004
Old 01-29-2005 , 17:45   Keeping player in air
Reply With Quote #1

How could I keep a player in the air without moving. Like the jedi_grab plugin but the player would stay in one place.
Ced is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 01-29-2005 , 20:28  
Reply With Quote #2

You could set their gravity to 0 and then change there speed to 0. Like this :
Code:
set_user_gravity(id, 0) // Not sure about this set_user_maxspeed(id, 0.0)
Peli is offline
Send a message via MSN to Peli
Ced
Member
Join Date: Oct 2004
Old 01-29-2005 , 20:46  
Reply With Quote #3

Ok, I will try that, ty
Ced is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 01-29-2005 , 20:48  
Reply With Quote #4

a better way would be to change his origin
FeuerSturm is offline
Ced
Member
Join Date: Oct 2004
Old 01-29-2005 , 20:52  
Reply With Quote #5

yes, but if I set his gravity to 0 or some number close to it (0.000000001), will he stay at that origin in the air?
Ced is offline
Ced
Member
Join Date: Oct 2004
Old 01-29-2005 , 22:07  
Reply With Quote #6

ok, I have another question. Say I don't want somebody to move, I would set their maxspeed to something low (btw, 0.0 doesn't work) and set their gravity to something in the thousands so they cannot jump. But how do I set it back. Is there any other way then storing a variable with their speed and gravity before you changed it. Can anyone show me an example of storing their speed and gravity as well. I can't believe I forgot how!

Thanx
Ced is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 01-29-2005 , 22:18  
Reply With Quote #7

get_user_gravity and get_user_maxspeed ? Then store them if those functions exist, then change them with set_user_whatever. When you want to change them back, just set them again to the varibles stored in wherever you stored the get_user_whatever stuff.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Ced
Member
Join Date: Oct 2004
Old 01-29-2005 , 22:23  
Reply With Quote #8

I know that, but i forget how to store them really. I thought you could do
Code:
new speed = get_user_maxspeed(id)
but that gives me a tag mismatch when i do
Code:
set_user_maxspeed(id, speed)
Ced is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-29-2005 , 22:38  
Reply With Quote #9

get_user_maxspeed returns a float value. Additionally, 0.0 will not work, you have to use 0.1.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Ced
Member
Join Date: Oct 2004
Old 01-29-2005 , 22:54  
Reply With Quote #10

oh, ok, is gravity an integer or a float? [edit] nvm, I got it, thanx for everyone's help
Ced 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:24.


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