Raised This Month: $ Target: $400
 0% 

set_user_maxspeed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 15:54   Re: set_user_maxspeed
Reply With Quote #9

If I remember, you have to check if maxspeed is not on 1 ( freezetime ) and if player is alive.

Code:
    #include <amxmodx>     #include <hamsandwich>     #include <fun>     new const Float:gMultiplier = 1.3; // 30% increase     new const Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame;     public plugin_init( )     {         register_plugin( "Speed per cent", "1.0", "Jon" );         RegisterHam( Ham_Player_ResetMaxSpeed, "player", "CBasePlayer_ResetMaxSpeed", 1 );     }         public CBasePlayer_ResetMaxSpeed ( const Player )     {         if ( is_user_alive( Player ) )         {             new Float:MaxSpeed = get_user_maxspeed( Player );                         if ( MaxSpeed != 1.0 )             {                 set_user_maxspeed( Player, MaxSpeed * gMultiplier );             }         }     }
__________________

Last edited by Arkshine; 10-25-2009 at 17:08.
Arkshine 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 00:36.


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