Raised This Month: $ Target: $400
 0% 

Why the speed didn't work ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 11-21-2009 , 05:45   Why the speed didn't work ?
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <fakemeta>
 
new MaxPlayers
 
#define Normalmovementin  270.0
#define Fastmovementan    370.0
 
new Movementin33 ] = 0
new Movementan33 ] = 0
 
public plugin_init( )  
{
     
register_plugin"Nemesis Menu""1.0""ASD" )
     
register_logevent"logevent_round_end"2"1=Round_End" )
     
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
     
MaxPlayers get_maxplayers( )
}
 
public 
zp_user_infected_postid )
{
        if ( 
is_user_aliveid ) && zp_get_user_nemesisid ) )
        {
                
set_task1.0"Nemesis_Menu"id )
        }
}
 
public 
Nemesis_Menuid )
{
    new 
menu menu_create"Nemesis Class Menu""nemesis_menu_handler" )
    
menu_additemmenu"Nemesis""1")
    
menu_additemmenu"Invicible Nemesis""2")
    
menu_additemmenu"Assassin Nemesis""3")
    
menu_setpropmenuMPROP_EXITMEXIT_ALL )
    
menu_displayidmenu)
}
 
public 
nemesis_menu_handleridmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroymenu )
        return 
PLUGIN_HANDLED
    
}
 
    new 
data], iName64 ]
    new 
accesscallback
    menu_item_getinfo
menuitemaccessdata5iName63callback )
    new 
key str_to_numdata )
 
    switch( 
key )
    {
        case 
1:
        {
            
chat_printid"You have chosen a Nemesis." )
        }
        case 
2:
        {
            
chat_printid"You have chosen Invicible Nemesis." )
            
set_user_maxspeedidLowmovementin );
            
Movementinid ] = 1
            
new name32 ]
            
get_user_nameidname31 )
            
set_hudmessage2250020.00.4510.05.01.01.0, -)
            
show_hudmessage0"%s has become a Invicible Nemesis."name )
        }
        case 
3:
        {
            
chat_printid"You have chosen Assassin Nemesis." )
            
set_user_maxspeedidFastmovementan );
            
Movementanid ] = 1
            
new name32 ]
            
get_user_nameidname31 )
            
set_hudmessage2250020.00.5010.05.01.01.0, -)
            
show_hudmessage0"%s has become a Assassin Nemesis."name )
        }
    }
    
menu_destroymenu )
    return 
PLUGIN_HANDLED
}
 
public 
fw_PlayerPreThinkid )
{
    static 
Float:fMaxSpeed 
 
    
if ( is_user_aliveid ) && zp_get_user_nemesisid ) )
    {
        if ( 
Movementinid ] == )
        {
            
fMaxSpeed get_user_maxspeedid )
            if ( 
fMaxSpeed Lowmovementin )
                
set_user_maxspeedidLowmovementin );
        }
        else
        {
            
set_user_maxspeedidNormalmovementin ); 
        }
 
        if ( 
Movementanid ] == )
        {
            
fMaxSpeed get_user_maxspeedid )
            if ( 
fMaxSpeed Fastmovementan )
                
set_user_maxspeedidFastmovementan );
        }
        else
        {
            
set_user_maxspeedidNormalmovementin ); 
        }
    }
    return 
PLUGIN_HANDLED;
}
public 
logevent_round_end( )
{
    for ( new 
1<= MaxPlayersi++ )
    {
        
Movementin] = 0
        Movementan
] = 0
    
}


Last edited by zombieplague; 11-22-2009 at 01:03.
zombieplague 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 13:40.


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