AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block player reload? (https://forums.alliedmods.net/showthread.php?t=45289)

hlstriker 09-28-2006 09:21

Block player reload?
 
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;

Zenith77 09-28-2006 12:26

Re: Block player reload?
 
http://forums.alliedmods.net/showthread.php?t=41265
Please search next time.

XxAvalanchexX 09-28-2006 15:22

Re: Block player reload?
 
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.

Zenith77 09-28-2006 15:55

Re: Block player reload?
 
Woops.

hlstriker 09-28-2006 17:15

Re: Block player reload?
 
Thank both of you :)


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

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