Raised This Month: $ Target: $400
 0% 

Block player reload?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 09-28-2006 , 09:21   Block player reload?
Reply With Quote #1

Hey i'm trying to block the player from reloading their gun.

Here is the code I am useing that does not work:
Code:
new wclip, wammo; if( (get_user_button(id) & IN_RELOAD) && (get_user_weapon(id,wclip,wammo) == CSW_M3) )     return PLUGIN_HANDLED;
hlstriker is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-28-2006 , 12:26   Re: Block player reload?
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=41265
Please search next time.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-28-2006 , 15:22   Re: Block player reload?
Reply With Quote #3

Blocking weapon fire, including client-side sounds/animations != Blocking player reload -- I'm not sure how searching would've found him that.

But, some of the code from that post is still relevant. Take the client_PreThink example he uses and replace IN_ATTACK with IN_RELOAD, and also do your weapon check.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-28-2006 , 15:55   Re: Block player reload?
Reply With Quote #4

Woops.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 09-28-2006 , 17:15   Re: Block player reload?
Reply With Quote #5

Thank both of you
hlstriker is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode