Jump to content

Using "radar" as command name does not work


johny46

Recommended Posts

Hi. I want to execute some function whenever a player opens his map. According to the "MTA hard-coded commands" section of Control names i should be able to use "radar" as a command. Then why this code:

addCommandHandler("radar", function() 
  outputDebugString("Command handler executed!") 
end) 

does not work? No debug string is outputted no matter if I press the F11 key or actually type "radar" on the console, but the map is shown in both situations.

Link to comment

It basically is meant to hide all player blips whenever they open their map and show them again when map is closed, so it has to be fast. I think i'll make a timer to call 'getKeyBoundToCommand' every second, because I don't think it's possible to save settings, press the OK button, then press Esc and then open the map in less than one second :P thanks.

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