Blocking all user input
How much am I going to need to hook if I want to basically block all user input.
What it needs to block: All movement ( jump, duck and walking/running ) Change weapons Firing ( hopefully sorted - found a thread on the subject) [I'll want to allow a few commands (say/name), but I can probably filter these myself ] And I'm hoping to be able to fake all of this too. The end result would be to have players controllable by another player. I don't need code for how to do this, just the commands I'm looking at hooking - I should be able to pick up most of the rest. Though naturally if there are threads about blocking/faking any of this it would be handy. |
Re: Blocking all user input
http://forums.alliedmods.net/showthr...ighlight=block
Quote:
|
Re: Blocking all user input
Yeah, I found that one.
Blocking buttons is all well and good, but they can still move (albeit slowly) I might just have to play around a lot. Thans, though. |
Re: Blocking all user input
Try to set the max speed of a player to 0.
|
Re: Blocking all user input
cl_forwardspeed?
Or is there a serverside player maxspeed? And the real bitch is that I don't actually want to stop them moving. I just want them to completely ignore what the user is pressing. The player needs to move when told to ... but I can do that by popping up maxspeed when the controlling player tells them to move, I suppose. Why do I feel this is going to be hard ... ah, well - what better way to learn than projects way outside your experience :-D |
Re: Blocking all user input
If you block the buttons, it will not move "a little bit." It will not move at all. Search the forums for IN_FORWARD and such and you'll find loads of scripting help threads were we help people with that.
Also, check out jedi_force_grab. That plugin sets a user's velocity to where you are aiming, and no matter what that user does movement wise, he moves to that velocity. He will still look like he is running, animation wise, but that could be blocked too. As far as firing, yeah, like you said that's easy you got that done. Changing weapons is a bit more difficult because you cannot block commands like slot2, nextinv, lastinv, etc. As well as when you drop a weapon you pull another out. What I would reccomend is to alter the pev_weapons variable and only give it the weapon he currently has out. Also block the drop command so he can't do what I just said. If there are still ways he can switch weapons after that (test it a lot), hook CurWeapon and switch him back. |
Re: Blocking all user input
Spot the legend :-D
And I tried doing: set_pev(id,pev_buttons,0) Which I'm pretty sure would remove all buttons, in the player prethink ... where should it be done? Anyways, thanks for the reply - I'll have another search around for the button constants, try to find these threads you speak of. |
| All times are GMT -4. The time now is 16:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.