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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.