Jump to content

Toggle Radar


Recommended Posts

Posted

I'm using the following code. It only works when I restart the resource. If I restart it then reconnect it doesn't work.

addEventHandler( "onClientResourceStart", getRootElement( getThisResource() ), 
    function () 
       toggleControl ( "radar", false ) 
    end 
) 

Thanks in advanced for the help!

Posted

Have you tried adding a output? like:

outputChatBox ( "HIDING RADAR" ) 

to know if the function is being executed or not.

P.S: Use 'resourceRoot' for addEventHandler, else it's going to execute that function everytime a resource starts, ANY resource.

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