Turbe$Z

[HELP ME] Disabled fire in my script, but players can shoot.. Why?

Recommended Posts

i used this in my script: 

		toggleControl ( 'fire', false )

but players can shoot with pressing tab, how to fix this?

Share this post


Link to post

Find out which control is bound to "tab" and disable it too.

I think there are at least 2 more controls to shoot with, "action" and the enter vehicle control, which is hard disable, since players won't be able to get in cars anymore.

Disabling the ability to aim can be helpful there.

Share this post


Link to post

You can also set the player weapon to fist then disable weapon switching and fire control so they never their weapons in hand

Share this post


Link to post
18 hours ago, Bonsai said:

Find out which control is bound to "tab" and disable it too.

I think there are at least 2 more controls to shoot with, "action" and the enter vehicle control, which is hard disable, since players won't be able to get in cars anymore.

Disabling the ability to aim can be helpful there.

@Bonsai, toggleControl will disable fire from every key that fire is bound to.

Use this if your code is server sided:

for _, player in ipairs(getElementsByType("player")) do
  toggleControl(player, "fire", false)
end  

 

Edited by Gravestone

Share this post


Link to post
3 hours ago, Gravestone said:

@Bonsai, toggleControl will disable fire from every key that fire is bound to.

Use this if your code is server sided:


for _, player in ipairs(getElementsByType("player")) do
  toggleControl(player, "fire", false)
end  

 

I know, but "fire" is not the only control to shoot a weapon.

Share this post


Link to post
2 minutes ago, Bonsai said:

I know, but "fire" is not the only control to shoot a weapon.

Sorry I can't understand you, which else control can be used to fire a weapon instead of 'fire'?

Share this post


Link to post

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.