'kay....This is an example I get from the plugin link above...=.=''
First,register a forward...
PHP Code:
register_forward( FM_PlayerPreThink, "client_prethink" )
Then...
PHP Code:
public client_prethink(id)
{
if (zp_get_user_zombie_class(id) == g_zclass_hunter) /// Don't tell me you don't know about cases too...
{
if(is_user_alive(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_hunter) && !zp_get_user_nemesis(id))
Action(id);
}
}
It will call the function name Action(id)
PHP Code:
public Action(id)
{
if (g_speeded[id] == 1)
{
set_user_maxspeed(id , g_fastspeed);
}
else
{
set_user_maxspeed(id , g_normspeed);
}
return PLUGIN_HANDLED;
}
This is just an example to make you understand the way to hook event more clearly.....Here another example ..from plugin
Speed Boost [Author:Fry!]
Go 2 sleep now ...Zzzzzzz