Raised This Month: $ Target: $400
 0% 

set_user_maxspeed [Help]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bibu
Veteran Member
Join Date: Sep 2010
Old 06-26-2011 , 05:08   Re: set_user_maxspeed [Help]
Reply With Quote #1

Something like this:

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN    "Speed"
#define AUTHOR    "joaquimandrade"
#define VERSION    "1.0"

new Ham:Ham_Player_ResetMaxSpeed Ham_Item_PreFrame

new maxSpeedFactorCvar 

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Player_ResetMaxSpeed,"player","playerResetMaxSpeed",1)
    
    
maxSpeedFactorCvar register_cvar("maxspeed_factor","50.0")
}

public 
playerResetMaxSpeed(id)
{
    static 
Float:maxspeed
    pev
(id,pev_maxspeed,maxspeed)
    
    if(
maxspeed != 1.0 /*&& NeedsSpeed(id) */)
    {
        
set_pev(id,pev_maxspeed,maxspeed get_pcvar_float(maxSpeedFactorCvar))
    }

You can read here more about it:

http://forums.alliedmods.net/showthr...t=94331&page=1
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu 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 23:25.


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