Jump to content

XML VS LUA


Drakath

Recommended Posts

Posted

So I'm planning to make my muting system which checks player serial. And I wanted to ask what is better to store the list of serials: xml or should I store it in the script ? Or maybe there is even a better way, if yes tell me.

s.epicrow.com:22003.png

Posted (edited)

https://forum.multitheftauto.com/viewtopic.php?f=148&t=38203

use this functions for database :D

'

make a variabile in data base, and when player is muted to change the variabile to number 1 :,, and when is unmuted to set the variabile to number 0...and another function .. call the variabile in database , and if number is 1 then.. muteplayer,, elseif number is 0 unmute it...

Edited by Guest

XajVsWV.png

168_zps269f1907.gif[Dev]BloWnRPG - We BloW the World [1%]168_zps269f1907.gif

Posted

when i was forced to use a database , i told myself thats it , again i will need to learn how to use it , etc .....

Well after i started making my first thing with the database , then wow , it's very easy , to add , remove , update . More easy like XML way.

Take a look here. https://forum.multitheftauto.com/viewtopic.php?f ... SQLite+TUT

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

Effects in the working of the function , nope. But the biggest problem is the restarting , if the script is restarted all your list is gone. Now if you wanna use it to mute player's for 5-10 min , it's ok using it in the script . But if you are going to mute 2 or more day's then it could be a problem.

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Posted

Well I was worried about server performance or lag because I use setElementData (source,"muted",true) but I never experienced list being gone. If it will be gone I will try to work with database.

s.epicrow.com:22003.png

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.
×
×
  • Create New...