Raised This Month: $ Target: $400
 0% 

set user maxspeed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-23-2010 , 15:33   Re: set user maxspeed
Reply With Quote #8

It's quite the same to use set_user_maxspeed.

Here's the snippet.

Check if user is alive so you don't alter spectator speed, and check if maxspeed is not 1.0 so you don't allow players to move during freezetime :

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

#define PLUGIN    "New Plugin"
#define AUTHOR    "Unknown"
#define VERSION    "1.0"

#define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Player_ResetMaxSpeed,"player","playerResetMaxSpeed",1)
}

public 
playerResetMaxSpeed(id)
{
    if( 
is_user_alive(id) && entity_get_float(idEV_FL_maxspeed) != 1.0 )
    {
        
entity_set_float(idEV_FL_maxspeed1000.0)
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 10:21.


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