Raised This Month: $ Target: $400
 0% 

Activating powers when you press the reload key


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-10-2010 , 18:02   Activating powers when you press the reload key
Reply With Quote #1

I have no idea why this wont work:

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_forward(FM_PlayerPreThink"Fw_PlayerPreThink")
}

public 
Fw_PlayerPreThinkid )
{
    if( 
pevidpev_button ) & IN_RELOAD )
    {
        if( 
IsHomer[id] == true )
        {
            
activateGravityid )
        }
        if( 
IsBart[id] == true )
        {
            
activateSpeedid )
        }
    }
}

public 
activateGravityid )
{
    if( 
is_user_aliveid ) && IsHomer[id] == true && UsedGravity[id] == false )
    {
        
UsedGravity[id] = true;
        
set_user_gravityid0.3 )
        
set_user_renderingidkRenderFxGlowShell050125kRenderNormal255 )
        
set_task15.0"removeGravity" )
        
client_print_coloridBlue"^4[^3FreezeTag^4] ^3Your gravity has been activated!" )
    } else {
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
removeGravityid )
{
    
set_user_gravityid1.0 )
    
set_user_renderingidkRenderFxNone000kRenderNormal255 )
    
client_print_coloridBlue"^4[^3FreezeTag^4] ^3Your gravity has expired!" )
}

public 
activateSpeedid )
{
    if( 
is_user_aliveid ) && IsBart[id] == true && UsedAccel[id] == false )
    {
        
UsedAccel[id] = true;
        
set_user_maxspeedid400.0 )
        
set_user_renderingidkRenderFxGlowShell050125kRenderNormal255 )
        
set_task15.0"removeSpeed" )
    } else {
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
removeSpeedid )
{
    
set_user_maxspeedid250.0 )
    
set_user_renderingidkRenderFxNone000kRenderNormal255 )
    
client_print_coloridBlue"^4[^3FreezeTag^4] ^3Your speed has expired!" )

__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
 



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 07:13.


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