Raised This Month: $51 Target: $400
 12% 

[CS:GO] Same speed with every weapon


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Eagle08
Junior Member
Join Date: Sep 2020
Old 09-01-2020 , 05:01   [CS:GO] Same speed with every weapon
Reply With Quote #1

Hi Everyone,

I've tired to create VIP for my server which will have ability to run with the same speed with every weapon.
This is what I've got so far and it doesn't work. I call this function on WeaponSwtich and SpawnPost.
PHP Code:
public Actionset_speed(client)
{
    new 
float:MyMax GetEntProp(clientProp_Data"m_flMaxSpeed");

    if (
g_Vip[client] && (MyMax<235.0))
        
g_iPlayerSpeed[client] = 235.0;

    else
    {
        
int ActWpn GetEntPropEnt(clientProp_Send"m_hActiveWeapon");
        new 
String:Weapon[32];
        
GetEntityClassname(ActWpnWeaponsizeof(Weapon));        
            
        if(
ActWpn == INVALID_ENT_REFERENCE)
        {
            
g_iPlayerSpeed[client] = gCSWeaponSpeed[view_as<int>(CSGOWeaponID_NONE)];
            return 
Plugin_Continue;
        }
                
        
g_iPlayerSpeed[client] = gCSWeaponSpeed[view_as<int>(WeaponClassNameToCSWeaponID(Weapon))];
    }
    if(
g_iPlayerSpeed[client] != MyMax)
        
SetEntProp(clientProp_Data"m_flMaxSpeed"g_iPlayerSpeed[client]);

Of course, I have stock with all weapon classnames converted to CSGOWeaponID and speeds, which I am using to adjust speed for non-Vip players.
The second problem I have is that I cannot give my Vip speed over 250.
Eagle08 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 19:59.


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