Raised This Month: $ Target: $400
 0% 

hook reload


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
tolpecek
Member
Join Date: Dec 2018
Old 01-06-2019 , 09:15   Re: hook reload
Reply With Quote #10

Quote:
Originally Posted by eat1k View Post
FakeMeta: pev(id, pev_buttons) & IN_RELOAD
I don't think Ham_Weapon_Reload will help you to do what you're trying to do. It's called only when a weapon is reloading so if you will press "R" without reloading a weapon it will not work.
Code:
register_forward(FM_PlayerPreThink, "fw_Player_PreThink")
Code:
public fw_Player_PreThink(id)
{
	
new buttons = pev(id, pev_button)
if(buttons & IN_RELOAD)
	{
		if(g_CanBuild)
		{
			cmdMoveEnt(id)
		}
		else 
		{
			cmdStopEnt(id)
		}
	}
}
doesnt work

Last edited by tolpecek; 01-06-2019 at 09:15.
tolpecek is offline
 



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 07:39.


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