Jump to content

Recommended Posts

  • Moderators
Posted (edited)

thx!

 

Lots of after editing ? pfff pfff fff

 

Will add some missing content later.

Edited by IIYAMA
  • Thanks 1
  • 3 weeks later...
  • Moderators
Posted

I added some information about the source variable. Feel free to ask questions about this subject.

 

 

  • 6 months later...
Posted
On 21/02/2019 at 20:25, IIYAMA said:

I added some information about the source variable. Feel free to ask questions about this subject.

 

 

Does attachedTo works for table?

local vehicles_table = {
	[vehicle],
	[vehicle],
}

And if so, then it will trigger for all vehicles which are in table?

  • Like 1
  • Moderators
Posted (edited)
7 hours ago, majqq said:

Does attachedTo works for table?


local vehicles_table = {
	[vehicle],
	[vehicle],
}

And if so, then it will trigger for all vehicles which are in table?

Nope it doesn't unfortunately.

 

But that doesn't mean you can't fake it. And save some network data.

local elementList = {vehicle, vehicle}

triggerClientEvent(root, "triggerEventForElementList", resourceRoot, elementList, "theEvent", "argument1")
addEvent("triggerEventForElementList", true)
addEventHandler("triggerEventForElementList", resourceRoot, function (elementList, theEvent, ...) 
 for i = 1, #elementList do
  triggerEvent(theEvent, elementList[i], ...)
 end
end, false)

 

Edited by IIYAMA
  • Like 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...