Raised This Month: $ Target: $400
 0% 

Solved [CS:GO] Autofire pistol


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-29-2018 , 11:06   [CS:GO] Autofire pistol
Reply With Quote #1

When i test AutoPistol on lan (windows) server with bots
it works, even i can kill bots with autofire
When i add this to server with players (linux)
it works only on client side, other players dont see even shots and 0 damage



Code:
HookEvent("weapon_fire", Event_WeaponFire, EventHookMode_Pre);

public Action Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	
	RequestFrame(FirePostFrame, client);
}
public FirePostFrame(client)
{
	if(IsValidClient(client))
	{
		new weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
		if(IsValidEntity(weapon))
		{
			SetEntProp(client, Prop_Send, "m_iShotsFired", 0);
		}
	}
}

Last edited by Indarello; 03-31-2018 at 02:12.
Indarello is offline
 


Thread Tools
Display Modes

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 20:28.


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