Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #include <sourcemod>
- #include <sdktools>
- public OnPluginStart()
- {
- HookEvent("weapon_reload", Event_ReloadStart);
- }
- public Action:Event_ReloadStart(Handle:event, const String:name[], bool:dontBroadcast)
- {
- new userid = GetEventInt(event, "userid");
- new client = GetClientOfUserId(userid);
- new weapon = GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon");
- new String:classname[256];
- GetEntityClassname(weapon, classname, sizeof(classname));
- if(StrContains(classname, "sg552", false) > -1)
- {
- new 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
Advertisement