Jump to content

Aiming


DarkByte

Recommended Posts

Posted

Hi. Can someone help me with a script? Its like when player not aiming and press mouse1 button or left button from mouse he is shooting. But i wanna make it only when aiming to shoot

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Im still learning please make a example

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Not working

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted
Not working

lol it works but jr forgot lua tag xD

addEventHandler('onClientPlayerWeaponFire', localPlayer, function() 
if (not getControlState('aim_weapon')) then cancelEvent() end 
end( 

2vjs7it.jpg
Posted
Not working

lol it works but jr forgot lua tag xD

addEventHandler('onClientPlayerWeaponFire', localPlayer, function() 
if (not getControlState('aim_weapon')) then cancelEvent() end 
end( 

addEventHandler('onClientPlayerWeaponFire', localPlayer, function() 
if (not getControlState('aim_weapon')) then cancelEvent() end 
end) 

Still not working

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

  • Moderators
Posted
This event is called when a player fires a weapon.

onClientPlayerWeaponFire is triggers after the bullet has been fired, that's why there is no info on the wiki about cancelEvent.

And if it did, these parameters wouldn't make any sense:(hitX, hitY, hitZ, hitElement)

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

Still not working

+No errors in debug

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Posted

Ive fixed it.

When I hear someone saying Mac is better than PC.

o0pjNKG.gif w0t?VeJXjxD.gifw0t? evspcFJ.gifw0t?

Great minds discuss ideas, average minds discuss events and small minds discuss people.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...