Jump to content

[Solved] Disable outputChatBox


Recommended Posts

in the end .

Like this? It crashed this way btw.

------------------------------- 
  
addEvent("onMapStarting",true) 
addEventHandler("onMapStarting",getRootElement(), 
function ( ) 
if getResourceInfo(res, "type") == "map" then 
    cancelEvent() 
end 
) 
-------------------------- 

Link to comment
  • Moderators

Because it is an error.

  
addEvent("onMapStarting",true) 
addEventHandler("onMapStarting",getRootElement(), 
function (  mapInfo, mapOptions, gameOptions ) --the parameters values are in tables. 
if getResourceInfo(source, "type") == "map" then --* 
    cancelEvent() 
end 
end) 
-- "onMapStarting" we are already talking about maps.* 
-- source is the map. 
  

Maybe you should check this:

https://wiki.multitheftauto.com/index.ph ... ource:Race

Edited by Guest
Link to comment
Because it is an error.
  
addEvent("onMapStarting",true) 
addEventHandler("onMapStarting",getRootElement(), 
function (  mapInfo, mapOptions, gameOptions ) --the parameters values are in tables. 
if getResourceInfo(source, "type") == "map" then --* 
    cancelEvent() 
end 
) 
-- "onMapStarting" we are already talking about maps.* 
-- source is the map. 
  

Maybe you should check this:

https://wiki.multitheftauto.com/index.ph ... ource:Race

So the error is the event handlers?

Link to comment
  • Moderators

Yes this will cancel the map, because the map is the source. It is your code.

  
addEvent("onMapStarting",true) 
addEventHandler("onMapStarting",getRootElement(), 
function ( )  
if getResourceInfo(source, "type") == "map" then 
    cancelEvent() 
end 
end) 

"onMapStarting" has nothing to do with the chatbox, I only finished the code that you made.

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