View Single Post
darkboss
Member
Join Date: Mar 2020
Location: Street (Homeless)
Old 01-31-2023 , 19:33   Re: [CSGO] how to fix this?
Reply With Quote #9

Quote:
Originally Posted by alasfourom View Post
I'm not familiar with CSS/CSGO, you could try this one

PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_VERSION "1.0"

ConVar g_Cvar_Plugin_Enable;
ConVar g_Cvar_Weapons_Speed;

public 
void OnPluginStart()
{
    
CreateConVar ("weapons_speed_version"PLUGIN_VERSION"Weapons Speed"FCVAR_SPONLY FCVAR_NOTIFY FCVAR_DONTRECORD);
    
g_Cvar_Plugin_Enable CreateConVar("enable_weapons_speed""1""Enable Plugin [1 = Enable, 0 = Disable]"FCVAR_NOTIFYtrue0.0true1.0);
    
g_Cvar_Weapons_Speed CreateConVar("set_weapons_speed""2.0""Set The Weapons Speed, Normal Speed Is Equal To 1.0"FCVAR_NOTIFY);
    
AutoExecConfig(true"Weapons Speed");
    
    
HookEvent("weapon_fire"Event_WeaponsSpeed);
    
HookEvent("weapon_reload"Event_WeaponsSpeed);
}

void Event_WeaponsSpeed(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId (event.GetInt("userid"));
    if (!
client || !IsClientInGame(client) || GetClientTeam(client) == || !IsPlayerAlive(client)) return;
    
    if(
g_Cvar_Weapons_Speed.FloatValue 1.0 && g_Cvar_Plugin_Enable.BoolValue)
        
RequestFrame(Weapons_Frameclient);
}

void Weapons_Frame(int client)
{
    
int iWeapon GetEntPropEnt(clientProp_Data"m_hActiveWeapon");
    
float fGameTime GetGameTime();
    
float fSpeedTime GetEntPropFloat(iWeaponProp_Send"m_flNextPrimaryAttack");
    
    
fSpeedTime -= fGameTime;
    
fSpeedTime *= 1.0 g_Cvar_Weapons_Speed.FloatValue;
    
fSpeedTime += fGameTime;
    
    
SetEntPropFloat(iWeaponProp_Send"m_flNextPrimaryAttack"fSpeedTime);
    
SetEntPropFloat(iWeaponProp_Send"m_flPlaybackRate"g_Cvar_Weapons_Speed.FloatValue);
    
SetEntPropFloat(clientProp_Send"m_flNextAttack"0.0);
    
SetEntPropVector(clientProp_Send"m_vecPunchAngle"NULL_VECTOR);


bro i need the reload of weapon to be fast not the fireshoot ...
darkboss is offline