Raised This Month: $ Target: $400
 0% 

I have a question about speeds.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 07-29-2009 , 11:52   Re: I have a question about speeds.
Reply With Quote #1

'kay....This is an example I get from the plugin link above...=.=''
First,register a forward...
PHP Code:
register_forwardFM_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
5c0r-|3i0 is offline
Reply



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 00:30.


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