Gravity
I want to make a plugin so that when you bind a key, and when you hold that key down, whoever you set it to when you bound it flies into the air. I am having trouble getting this to work. Here is what I have...
Code:
I used Lud's jetpack mod as a reference, and I copied a little... this is only my second plugin. |
*bump* Does anyone know how I can do this? I want it so you bind a key to "+amx_fly playername" so that when you hold that key down, they go up, and when you let go, they go back down.
|
use suphero "Superman" as a reference much better.
|
You could try this:
set their gravity to 0.01 and Code:
Should work :D (this is how i did it in my SuperKeeper plugin) |
So, is this what it should look like?
Code:
I'm not at home and can't test it out yet... |
Ok, I got my origional thing working... my problem was because I had victem swiched with player. Anyway, now i need to be able to...
1) make it so you can easily navigate in the air, like by somehow making you able to control yourself better while airborne, but only for one player... As a last resort, I would want to make seperate binds for side thrusters and forward/reverse... Can somone plz tell me how to do that? 2) Make your aim better while airborne. 3) Hover when you are in the air. If anyone could explain this it'd be nice. Thanks. |
for moving in the air.. see my SuperKeeper plugin (search for it).
It is a bit complicated so lemme tell you how i do it: 1) I set their gravity to 0.01, so they don't really move 2) I check their keys, and compute a velocity vector. 3) I set their velocity to the new vector. Works perfect :D |
I used that code that you gave me in that earlier post, and I don't think it worked right... It just draged me in a single direction, no matter what way I was trying to move.
|
I looked through that superkeeper plugin and it is WAY over my head. Can somone plz help me?
|
I just use a plugin available for amx right now, and bind it accordingly.
its something like personal gravity or something... and I just do alias +fly amx_grav [name] -30 alias -fly amx_grav [name] 100 bind pgup +fly and thats all there is to it...the plugin even makes them jump...forgot the actual name of the plugin though. |
| All times are GMT -4. The time now is 14:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.