Jump to content

How to call function trough resources / export function?


Recommended Posts


this function resource "radar"

function render()

and not working in resource "account" this:

removeEventHandler ( "onClientRender", getRootElement(), render )

for disable Radar mod.

Link to post

you try to remove event that not exist in the current file

so you should use call functions


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 post


You can more easily use triggerEvent from one resource to another. Example:

1st resource:
function render()
your code here
addEventHandler("onClientRender", getRootElement(), render)

function hideRadar()
removeEventHandler("onClientRender", getRootElement(), render)
addEvent("hideRadar", true)
addEventHandler("hideRadar", root, hideRadar)

2nd resource:
function yourfunction()
triggerEvent("hideRadar", source)
addEventHandler("yourevent", getRootElement(), yourfunction)


Link to post
  • Patrick changed the title to How to call function trough resources / export function?

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