AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook when weapon done reloading (https://forums.alliedmods.net/showthread.php?t=148079)

ARES[ro] 01-17-2011 19:25

Hook when weapon done reloading
 
I need way to hook when weapon is done reloading. That means when the numbers down bottom right are changed substracting the bpammo and adding to clip ammo.

drekes 01-17-2011 19:30

Re: Hook when weapon done reloading
 
http://wiki.alliedmods.net/Half-Life_1_Game_Events#AmmoX

ARES[ro] 01-17-2011 19:34

Re: Hook when weapon done reloading
 
that gets also called on weapon draw weapon switch....

DarkGod 01-17-2011 19:50

Re: Hook when weapon done reloading
 
Quote:

Originally Posted by ARES[ro] (Post 1395915)
that gets also called on weapon draw weapon switch....

Do a bpammo check then?

ARES[ro] 01-17-2011 20:34

Re: Hook when weapon done reloading
 
Quote:

Originally Posted by DarkGod (Post 1395920)
Do a bpammo check then?

I would but in zombie plague thats always the same value ok? Can any1 really help me with a hook on when reload is over.
Or tell me how to get with pdata the reload time and i can add that to my ham_weapon_relaod hook.

drekes 01-17-2011 20:40

Re: Hook when weapon done reloading
 
hope this helps: http://wiki.alliedmods.net/CBasePlayerWeapon_%28CS%29

ARES[ro] 01-17-2011 20:44

Re: Hook when weapon done reloading
 
perfect, thanks drekes +karma but still didnt help cuz there is no countdown

Bugsy 01-18-2011 00:21

Re: Hook when weapon done reloading
 
Easiest would be to hook CurWeapon since the HUD ammo is updated when reload is completed. Of course you will need some conditionals too since it is called on more than just reload.

ARES[ro] 01-18-2011 00:46

Re: Hook when weapon done reloading
 
Yes bugsy I never denied its a good solution but it will never work with zombie plague because the bpammo is always going to be full. But I got this with Ham_weapon_reload and Ham_item_postframe. Now I have a different problem, going to post it in a new thread. Thanks for being helpful.


All times are GMT -4. The time now is 18:43.

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