View Single Post
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 05-02-2014 , 04:57   Re: Hamsandwich Updating
#273

Quote:
Originally Posted by Arkshine View Post
Bot without "player" classname is now supported by Ham in git3805+.

This can't be enabled by default considering existing workaround used by plugins and to avoid unexpected behavior.

A new "specialbot" param has been added to RegisterHam. On false by default.
A stock has been added as well named "RegisterHamPlayer" where you don't need provide "player" classname and specialbot is set to true already. Just to make code more intuitive.
Arkshine how to see the full changes log on current dev build? it seems the web page is updated, last time it easy to see changes log.

**Edited**
Typo detected:
Code:
/**
 * Hooks the virtual table for the player class.
 * An example would be: RegisterHam(Ham_TakeDamage, "player_hurt");
 * Look at the Ham enum for parameter lists.
 *
 * @param function        The function to hook.
 * @param callback        The forward to call.
 * @param post            Whether or not to forward this in post.
 * @return                 Returns a handle to the forward.  Use EnableHamForward/DisableHamForward to toggle the forward on or off.
 */
stock HamHook:RegisterHamPlayer(Ham:function, const Callback[], Post=0)
{
    return RegisterHam(function, "player", Callback, Post, .specialbot = true);
}
Error:
Code:
* An example would be: RegisterHam(Ham_TakeDamage, "player_hurt");
Should be:
Code:
* An example would be: RegisterHamPlayer(Ham_TakeDamage, "player_hurt");
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019

Last edited by yokomo; 05-02-2014 at 05:04.
yokomo is offline