Jump to content

[REL] MTA Custom Data System [Save CPU and Ram]


cleopatra

Recommended Posts

Posted

MTA Lua Custom Data System

What is this?:

MTA's own functions create a high of cpu and high of usage ram.

Therefore I keep the element data with the table system.

 

How can I use?:

sync_element.lua

paste to the file script you want to use,

Then add meta.xml:

<script src='sync_element.lua' type='shared' />

Note:

You can only return data from scripts where you use the library.

Download Link:

Download Here - GitHub

 

 

  • Like 1
  • Thanks 1
  • Sad 1
Posted (edited)

First download the script and open files, find the files:                                                                                                                                                                                                             

sync_element.lua

And import the your third party resource, then use:

getElementData(element, data, value)
setElementData(element, data, value)
removeElementData(element, data, value)

or you can use export:

exports.custom_data:getElementData(element, data, value)
exports.custom_data:setElementData(element, data, value)
exports.custom_data:removeElementData(element, data, value)

 

Edited by yourpalenes
  • Thanks 1
  • 4 weeks later...
  • 1 year later...
  • Moderators
Posted

The repository is no longer available. I'm gonna close this thread to avoid future inconveniences/bumps.
@yourpalenes Please send me a private message, if you want to reopen it, thanks.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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