Drakath Posted August 21, 2013 Share Posted August 21, 2013 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. Link to comment
Drakath Posted August 21, 2013 Author Share Posted August 21, 2013 But how will I remove a mute from database ? Link to comment
golanu21 Posted August 21, 2013 Share Posted August 21, 2013 (edited) https://forum.multitheftauto.com/viewtopic.php?f=148&t=38203 use this functions for database ' 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 August 21, 2013 by Guest Link to comment
bandi94 Posted August 21, 2013 Share Posted August 21, 2013 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 Link to comment
Drakath Posted August 21, 2013 Author Share Posted August 21, 2013 Are there side effects using the list in the script ? Link to comment
xXMADEXx Posted August 21, 2013 Share Posted August 21, 2013 SQLite/MySQL would probably be the best for this... Link to comment
bandi94 Posted August 21, 2013 Share Posted August 21, 2013 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. Link to comment
Drakath Posted August 21, 2013 Author Share Posted August 21, 2013 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. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now