Raised This Month: $ Target: $400
 0% 

Changing bool value.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-09-2009 , 18:53   Re: Changing bool value.
Reply With Quote #9

PHP Code:
#include <amxmodx>
#include <engine>
#include <fun>

new const Floatg_fMaxSpeed[] = 
{
    
250.0//no weapon
    
250.0//p228
    
0.0,   //shield
    
260.0//scout
    
250.0//hegrenade
    
240.0//xm1014
    
250.0//c4
    
250.0//mac10
    
240.0//aug
    
250.0//smoke
    
250.0//elite
    
250.0//fiveseven
    
250.0//ump45
    
210.0//sg550
    
240.0//galil
    
240.0//famas
    
250.0//usp
    
250.0//glock
    
210.0//awp
    
250.0//mp5navy
    
220.0//m249
    
230.0//m3
    
230.0//m4a1
    
250.0//tmp
    
210.0//g3sg1
    
250.0//flash
    
250.0//deagle
    
235.0//sg552
    
221.0//ak47
    
250.0//knife
    
245.0  //p90
};

new 
boolg_bHoney33 ];
new 
g_iCurWeapon33 ];

public 
plugin_init() 
{
    
register_plugin"honey" "1.0" "bugsy" );
    
    
register_event"CurWeapon" "fw_CurWeapon" "be" "1=1" );
    
    
register_clcmd"say /honey" "DoHoney" );
    
register_clcmd"say /removehoney" "RemoveHoney" );
}

public 
fw_CurWeaponid )
{
    static 
iWeaponiWeapon read_data);
    
    if ( 
g_bHoneyid ] && ( g_iCurWeaponid ] != iWeapon ) )
    {
        
set_user_maxspeedid 50.0 );
        
        
g_iCurWeaponid ] = iWeapon;
    }
}

public 
DoHoneyid )
{
    static 
Float:vVelocity];
    
    if ( !
g_bHoneyid ] )
    {
        
entity_get_vectorid EV_VEC_velocity vVelocity );
        
vVelocity[0] = vVelocity[0] / 2.0;
        
vVelocity[1] = vVelocity[1] / 2.0;
        
entity_set_vectorid EV_VEC_velocity vVelocity );
        
        
set_user_maxspeedid 50.0 );
        
        
g_bHoneyid ] = true;
    }
}

public 
RemoveHoneyid )
{
    if ( 
g_bHoneyid ] )
    {
        
g_bHoneyid ] = false;
        
        
set_user_maxspeedid g_fMaxSpeedget_user_weaponid ) ] );
    }

__________________

Last edited by Bugsy; 08-09-2009 at 18:58.
Bugsy 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 18:26.


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