PreThink and client buttons
I'm trying to reverse the users direction. move left = move right etc.
Currently I have: Code:
but it won't work :( Maybe it's because i need to stop moving left first? I've tryed different approches but none worked. Prethink is called correctly. |
to stop the other movement use the - sign.
so Code:
|
Without trying I think you're wrong.
You see the idea here is to move as long as you hold down the button, when you release the button you stop move. If you only write +moveright you will move right until the command "-moveright" is entered. |
Hes right.
First in your plugin you have to stop them moving by using the: Code:
-movedirectionCode:
|
The problem is.. It's not working. I've already tried that and you just stand still when "trying" to move left instead of going right.. What's really annoys me is, that SHOULD work, and i really can't see why it wont.
1) User hold down a KEY -- It stop and begin to move right 2) User releases KEY. Now get_user_button & LEFT returns 0 and else if is called. old button is LEFT one time and it should then stop moving RIGHT.. but noooo :( |
Instead of using prethink, try registering the +moveleft and +moveright.
|
whats FMRES_HANDELED ?
|
Charr: Yeah, but i would really like it to work in prethink, I've used prethink before to make it so the user could not attack so this should be do-able. Thanks for the advice though :)
|
Try using a test script were you could use something like client_print instead moving the player.
|
its flimmering... or w/e... does IN_MOVELEFT means, player is pressing "go left btn" or player is going left or maby something else...?
|
| All times are GMT -4. The time now is 23:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.