Raised This Month: $ Target: $400
 0% 

set_user_maxspeed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 10-25-2009 , 15:33   Re: set_user_maxspeed
Reply With Quote #1

try this:
PHP Code:
#include <amxmodx>
#include <fun>

new bool:g_freezetime
new Float:g_weap_speed[32] = {0.0250.00.0260.0250.0240.0250.0250.0240.0,
250.0250.0250.0250.0210.0240.0240.0250.0250.0210.0250.0220.0230.0,
230.0250.0210.0250.0250.0235.0221.0250.0245.00.0}

new 
Float:g_speed_modifier 1.4  //with this you will get 140% of normal speed for every weapon
new g_max_players

public plugin_init(){
    
register_plugin("ModifyWeaponSpeed""1.0""Sylwester")
    
register_event("CurWeapon""event_CurWeapon""be""1=1")
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_logevent("logevent_round_start"2"1=Round_Start")
    
g_max_players get_maxplayers()
}

public 
event_CurWeapon(id)
    
reset_player_speed(id)

public 
event_new_round()
    
g_freezetime true

public logevent_round_start(){
    
g_freezetime false
    set_task
(0.1"delayed_round_start")
}

public 
delayed_round_start(){
    for(new 
i=1i<=g_max_playersi++)
        if(
is_user_alive(i))
            
reset_player_speed(i)
}

public 
reset_player_speed(id){
    if(
g_freezetime)
        return
    
set_user_maxspeed(idg_weap_speed[get_user_weapon(id)] * g_speed_modifier)

__________________
Impossible is Nothing
Sylwester 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 00:36.


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