vilhem Posted May 27, 2020 Share Posted May 27, 2020 Hi. this function resource "radar" function render() and not working in resource "account" this: removeEventHandler ( "onClientRender", getRootElement(), render ) for disable Radar mod. Link to comment
MrKAREEM Posted May 28, 2020 Share Posted May 28, 2020 you try to remove event that not exist in the current file so you should use call functions Call if you already have exported the function so make sure you have exported the function render and check the meta if you add the export in it then then try again Link to comment
Hydra Posted May 28, 2020 Share Posted May 28, 2020 You can more easily use triggerEvent from one resource to another. Example: 1st resource: function render() your code here end addEventHandler("onClientRender", getRootElement(), render) function hideRadar() removeEventHandler("onClientRender", getRootElement(), render) end addEvent("hideRadar", true) addEventHandler("hideRadar", root, hideRadar) 2nd resource: function yourfunction() triggerEvent("hideRadar", source) end addEventHandler("yourevent", getRootElement(), yourfunction) https://wiki.multitheftauto.com/wiki/TriggerEvent Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now