Jump to content

Recommended Posts

  • Moderators

By defining the resourceRoot as source element and attach it at the other side with the resourceRoot as well.

 

 

 

Client

triggerServerEvent("event", resourceRoot)

theElement: The element that is the source of the event.

Server

addEvent("event", true)
addEventHandler("event", resourceRoot,

attachedTo: The element you wish to attach the handler to. The handler will only be called when the event it is attached to is triggered for this element, or one of its children. Often, this can be the root element (meaning the handler will be called when the event is triggered for any element).

https://wiki.multitheftauto.com/wiki/AddEventHandler

The source element is LINKED to the attachedTo element. The attachedTo element will only accept the same element or the children of that same element.

 

The triggerEventSystem is a global system and the events will always be global accessible.

You have to do this for every resource that uses the same event name. The root element will accepts everything, included resourceRoot's.

Edited by IIYAMA
  • Like 2
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...