SkatCh Posted December 21, 2014 Share Posted December 21, 2014 hi guys please i have a simple question , can anyone explane to me when i need to use : - root with triggerClientEvent ("Eventname",root) Link to comment
WASSIm. Posted December 21, 2014 Share Posted December 21, 2014 you dont' need use root for triggerClientEvent its just source of event sourceElement: The element that is the source of the event. Link to comment
pa3ck Posted December 21, 2014 Share Posted December 21, 2014 root is the predefined word for getRootElement() It's an other word for "everything". For example, when you use outputChatBox, you have to specify the player element or you can use getRootElement() to display the very same message to every single player. An other example: At triggerClientEvent() the first argument is the sendTo -> which is the player you want the function to run on. But, if you use getRootElement() as the sendTo element, it will run for every single player. 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