|
Member
Join Date: Mar 2020
Location: Street (Homeless)
|
01-31-2023
, 19:33
Re: [CSGO] how to fix this?
|
#9
|
Quote:
Originally Posted by alasfourom
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_NOTIFY, true, 0.0, true, 1.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[] name, bool dontBroadcast)
{
int client = GetClientOfUserId (event.GetInt("userid"));
if (!client || !IsClientInGame(client) || GetClientTeam(client) == 1 || !IsPlayerAlive(client)) return;
if(g_Cvar_Weapons_Speed.FloatValue > 1.0 && g_Cvar_Plugin_Enable.BoolValue)
RequestFrame(Weapons_Frame, client);
}
void Weapons_Frame(int client)
{
int iWeapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
float fGameTime = GetGameTime();
float fSpeedTime = GetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack");
fSpeedTime -= fGameTime;
fSpeedTime *= 1.0 / g_Cvar_Weapons_Speed.FloatValue;
fSpeedTime += fGameTime;
SetEntPropFloat(iWeapon, Prop_Send, "m_flNextPrimaryAttack", fSpeedTime);
SetEntPropFloat(iWeapon, Prop_Send, "m_flPlaybackRate", g_Cvar_Weapons_Speed.FloatValue);
SetEntPropFloat(client, Prop_Send, "m_flNextAttack", 0.0);
SetEntPropVector(client, Prop_Send, "m_vecPunchAngle", NULL_VECTOR);
}
|
bro i need the reload of weapon to be fast not the fireshoot ...
|
|
|
|