Sniper / Gun
#15
I used to have the same problem with WorldEdit's compass tool. Use the HOOK_PLAYER_ANIMATION for that. Here is an example:
function OnPlayerAnimation(a_Player, a_Animation)
	-- In 1.8.x the left click has a value of 0, while in 1.7.x it's 1
	local LeftClickAnimation = (a_Player:GetClientHandle():GetProtocolVersion() > 5) and 0 or 1
	if (a_Animation ~= LeftClickAnimation) then
		return false
	end
	DoStuff(a_Player)
end


function DoStuff(a_Player)
	--  Do the things
end
Here is my code from WorldEdit
Reply
Thanks given by: JuliB


Messages In This Thread
Sniper / Gun - by JuliB - 01-06-2016, 08:15 AM
RE: Sniper / Gun - by Schwertspize - 01-06-2016, 08:55 AM
RE: Sniper / Gun - by NiLSPACE - 01-06-2016, 05:56 PM
RE: Sniper / Gun - by JuliB - 01-06-2016, 10:01 PM
RE: Sniper / Gun - by JuliB - 01-07-2016, 07:28 AM
RE: Sniper / Gun - by NiLSPACE - 01-07-2016, 07:33 AM
RE: Sniper / Gun - by JuliB - 01-07-2016, 08:09 AM
RE: Sniper / Gun - by xoft - 01-07-2016, 08:31 AM
RE: Sniper / Gun - by xoft - 01-07-2016, 08:34 AM
RE: Sniper / Gun - by NiLSPACE - 01-07-2016, 08:35 AM
RE: Sniper / Gun - by xoft - 01-07-2016, 08:40 AM
RE: Sniper / Gun - by JuliB - 01-07-2016, 10:55 AM
RE: Sniper / Gun - by NiLSPACE - 01-07-2016, 05:37 PM
RE: Sniper / Gun - by JuliB - 01-07-2016, 10:03 PM
RE: Sniper / Gun - by NiLSPACE - 01-07-2016, 10:21 PM
RE: Sniper / Gun - by JuliB - 01-07-2016, 10:35 PM
RE: Sniper / Gun - by JuliB - 01-07-2016, 11:27 PM
RE: Sniper / Gun - by NiLSPACE - 01-07-2016, 11:33 PM
RE: Sniper / Gun - by xoft - 01-08-2016, 01:13 AM
RE: Sniper / Gun - by JuliB - 01-08-2016, 08:52 AM
RE: Sniper / Gun - by NiLSPACE - 01-08-2016, 01:38 AM
RE: Sniper / Gun - by NiLSPACE - 01-08-2016, 05:49 PM
RE: Sniper / Gun - by JuliB - 01-09-2016, 12:56 AM
RE: Sniper / Gun - by NiLSPACE - 01-09-2016, 01:10 AM
RE: Sniper / Gun - by JuliB - 01-09-2016, 01:13 AM
RE: Sniper / Gun - by NiLSPACE - 01-09-2016, 01:18 AM
RE: Sniper / Gun - by JuliB - 01-09-2016, 01:19 AM
RE: Sniper / Gun - by NiLSPACE - 01-17-2016, 08:57 AM
RE: Sniper / Gun - by JuliB - 01-17-2016, 09:31 PM



Users browsing this thread: 10 Guest(s)