Jump to content

Recommended Posts

Posted

                                                   A wonderful explanation as usual

  • Thanks 1

                                                         هل ساعدتك في شئ ؟؟؟؟

                                                Mmpe7Jm.gif

                                                   latest?cb=20170707023932                 

                                            KillerX#9078

  • Moderators
Posted (edited)

thx!

 

Lots of after editing ? pfff pfff fff

 

Will add some missing content later.

Edited by IIYAMA
  • Thanks 1

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • 3 weeks later...
  • Moderators
Posted

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

 

 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • 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

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Recently Browsing   0 members

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