Raised This Month: $ Target: $400
 0% 

Players maxspeed help needed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 07-19-2007 , 21:06   Players maxspeed help needed
Reply With Quote #1

After i played on a scout only server i missed the fast movements on my own server and specialy with the AWP or other heavy weapon. Due this i had the idea to give every weapon the same weapon speed of 260. I've totally no idea how to make such a plugin and decided to edit a current plugin that already get close to my ideas and used v3x various weapon speeds for this.

It seems to work very well such as changing between weapons is no problem except one thing, when a new round started and i don't switch between guns or fire a bullet i use the default CS weapon speed, after i fired a shot or changed a weapon then i use again the new weapon speed.

Where i'm looking for is a script that when a player spawned his maxspeed is 260 and then the plugin would work 100%, hopefully someone know how to fix this and want to help me.


here is the edited script of v3x's script code.
Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN    "PLUGIN"
#define AUTHOR    "AUTHOR"
#define VERSION    "VERSION"

public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR)
    register_event("CurWeapon","check_speed","be")
    register_cvar("knife_speed","800")
    register_cvar("m4a1_speed","100")
    register_cvar("default_speed","400")
    register_logevent("new_round",2,"1=Round_Start")
}

public new_round(id)
{
    set_user_maxspeed(id,float(get_cvar_num("default_speed")))
    return PLUGIN_CONTINUE
}

public check_speed(id)
{
    new clip, ammo
    new weapon = get_user_weapon(id,clip,ammo)

    switch(weapon)
    {
        case CSW_KNIFE:
        {
            set_user_maxspeed(id,float(get_cvar_num("knife_speed")))
        }
        case CSW_M4A1: 
        {
            set_user_maxspeed(id,float(get_cvar_num("m4a1_speed")))
        }
        default:
        {
            set_user_maxspeed(id,float(get_cvar_num("default_speed")))
        }
    }
    return PLUGIN_CONTINUE
}
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.
Maurice 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 21:30.


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