[SOLVED] Need help with my anti move and shoot plugin
Hello you probaly think I'm weired. Anyways I figured it would be good with this plugin for my aim training, as I need to stand still everytime I shoot, else my bullets wont hit.
Anyways I need to make my plugin kill me everytime I don't stand still while shooting. This is what I picked up on the forums for moveing, but I'm not sure where I finde the rest I need to finish this. PHP Code:
UPDATE: Here is what I've come up with so far. PHP Code:
PHP Code:
|
Re: Need help with my anti move and shoot plugin
Hmm trying to compile some of this causeing
PHP Code:
PHP Code:
|
Re: Need help with my anti move and shoot plugin
I think you might be able to get away with something easier. A way to detect firing is by hooking the CurWeapon event, as shown by xeroblood here:
http://forums.alliedmods.net/showpos...59&postcount=2 The CurWeapon event is sent any time a player changes weapon or the ammo in his clip changes, so by keeping track of it all you can tell when a player fires a bullet. Then you should be able to check what buttons he is pressing (pev_button) for any movement keys, and if detected kill him with user_kill. Code:
Let me know how it works. Ava |
Re: Need help with my anti move and shoot plugin
WoW thx for the reply I came up with some thing my self
PHP Code:
EDIT: SCRATCH THAT... After adding it to plugin.ini it loads ^^, works like a charm. Thx a lot buddy :P |
Re: Need help with my anti move and shoot plugin
Oh, I see. What is the problem with AMXX?
|
Re: Need help with my anti move and shoot plugin
1 Attachment(s)
Hello if anyone is in need of this and want to use it I will attach it to this post :)
BTW I'm useing LuxBots with DM and HSOnly mod if you'd like to know for some reason xD PS: remember to say thanks to XxAvalanchexX :) EDIT: Only thing that could be optimized is it should only effect player and not bots + it should also take effect when your moveing after a keypress and not standing completly still. |
Re: [SOLVED] Need help with my anti move and shoot plugin
Yay! I'm glad it works. Also, if you're testing with bots, you can disable it for bots by changing the first if statement to something like
Code:
|
Re: [SOLVED] Need help with my anti move and shoot plugin
Oh and did you know your my Hero? :3
|
| All times are GMT -4. The time now is 19:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.