yourpalenes

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

Recommended Posts

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

Share this post


Link to post

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

Share this post


Link to post

Can i use this method for save the players money and skin and .... ??

Share this post


Link to post

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.