Jump to content

ToggleControl Problems!


_DrXenon

Recommended Posts

So, I was trying to use toggleControl to disable fire with toggleControl("fire",false) (also used the server version of that)

But the function doesn't work, there is no error/debug also. Did anyone encounter such problem?

I suspect having a function that enables that controls automatically, like every second, but I am not sure if there is such function inside my scripts.

Thats why I am asking, there might be another reason for toggleControl not to work on server/client?

Link to comment

Try with this in client :

 

function notoggle()
toggleControl ("fire", false )
setTimer(toggle,1000,1)
	end
addEventHandler("onClientResourceStart", resourceRoot, notoggle)

function toggle()
toggleControl ("fire", true )
    setTimer(notoggle,1000,1)
end

 

Link to comment

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...