Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #pragma semicolon 1
- #pragma newdecls required
- public void OnPluginStart()
- {
- HookEvent("weapon_reload", Event_ReloadStart);
- }
- public Action Event_ReloadStart(Handle event, const char[] name, bool dontBroadcast)
- {
- int userid = GetEventInt(event, "userid");
- int client = GetClientOfUserId(userid);
- int weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
- char classname[256];
- GetEntityClassname(weapon, classname, sizeof(classname));
- if(StrContains(classname, "sg552", false) > -1)
- {
- float nextattack;
- nextattack = GetEntPropFloat(client, Prop_Send, "m_flNextAttack");
- nextattack -= 0.6;
- SetEntPropFloat(client, Prop_Send, "m_flNextAttack", nextattack);
- SetEntPropFloat(weapon, Prop_Send, "m_flNextPrimaryAttack", nextattack);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment