Regarding several Ham Functions
Ham_RemovePlayerItem
- Isn't this hookable ? - If it is hooked shouldn't it be triggered when a player drops or gets stripped of a weapon ? Ham_Item_Drop - Isn't this hookable ? - If it is hooked shouldn't it be triggered when a player drops a weapon ? Ham_Weapon_RetireWeapon - Shouldn't this be triggered when player is switching or dropping weapons ? |
Re: Regarding several Ham Functions
All Ham functions are hookable, but it doesn't mean it's safe to supercede them.
Ham_RemovePlayerItem happens when you strip an item from the player. Ham_Item_Drop when you drop a weapon (unsure) Ham_Weapon_RetireWeapon, in Half-Life you will automatically change to a "better weapon", determined by weight, after you ran out of ammo of certain weapons(throwables) thus calling this method. |
Re: Regarding several Ham Functions
Ham_RemovePlayerItem
- Hooked, seems to be never called, even after calling it with ExecuteHamB Ham_Item_Drop - Hooked, seems to be never called Ham_Weapon_RetireWeapon - Hooked, seems to be called only when using it with ExecuteHamB PHP Code:
|
Re: Regarding several Ham Functions
Ham_RemovePlayerItem is called on "player" entities when a client sends "drop" or when the game (in many different cases it looks like) forces a player to drop an item, like when a player dies.
Ham_Item_Drop is called only in a few cases it looks like and it actually destroys the weapon entity. There is CBasePlayerItem:Kill which does the same. I don't really get the logic behind this function, but it shouldn't be used to hook when a weapon is dropped. Ham_Weapon_RetireWeapon is called when a weapon should be holstered and the next best weapon should be deployed. That happens for example when you throw a flashbang or run out of ammo. |
| All times are GMT -4. The time now is 22:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.