Flags question....
Alright just one question, if you set the player flag, meaning you, from FL_ONGROUND to FL_SWIM, and then you started moving, would you be moving as if you were swimming?
P.S. Alright if you registered a cvar, where would you paste the cvar information? In amxx.cfg? |
1) i dont think so, only if the player is not touching the ground
2) huh? Code:
|
1) Yes it would you move as you were swimming..
2) You could post the cvar anywhere a file was executed( well not anywhere) either amxx.cfg or server.cfg, or you could create your own .cfg and tell the plugin to execute it.... |
Hmm....okay one more question, if you also set the flag to FL_INWATER could you move up and down as if you were in water?
|
pm_shared.c handles your movement if I'm not mistaken, and it doesn't use FL_INWATER at all. It uses waterlevel and watertype. Also, in certain parts it uses PointContents to see if you're in water. Your best bet is to try this every prethink or postthink (I'm not sure which):
Code:
NOTE: This may make you drown. |
Oh really, cause I thought I would have to rewrite the whole movement functions if you moved in the air....Here's my coding so far. BTW: My left and right button doesn't work. And you can ignore the whole movetype fly stuff as well, I didn't bother erasing it yet that's why it's still there lol.
EDIT: I changed the buttons to moveleft and moveright, I'm gonna see if this works now.... Code:
Now my question is, if I implement your code, I wouldn't have to mess around with the movement buttons right (like what you see above)? |
I don't know, I've never tried.
|
Okay, well I tested out my prethink method, and I can go forwards or backwards in the air, but I can't seem to move left or right. I was wondering if there was something wrong with my coding and also if I push any other buttons like the attack button, I just stand still could someone help me out on this:
Code:
|
i thin its IN_LEFT/RIGHT but might be wrong
|
Actually I have tried LEFT and RIGHT and it didn't work, the LEFT and RIGHT button I found out was just for turning, MOVELEFT and MOVERIGHT is what actually makes you move left and right. And I gave more info in my previous post, cause I'm thinking it's that else statement that's causing me to stand still if I fire a weapon. I'm not sure though...
EDIT: ALright I'm feeling proud of myself, no one helped me on this, but I fixed the whole firing weapon part while not moving in the air, so you can move again. Took a while for me to figure out though. Now all I got to worry about is the left and right operations. |
| All times are GMT -4. The time now is 14:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.