Hero192 Posted February 2, 2016 Posted February 2, 2016 Hey all,I just want to know which type of saving fine fit to be used in a server saving's datas, MySQL system , SQLite or XML ?
Sir.BEEF Posted February 2, 2016 Posted February 2, 2016 I think MySQL. i personally use it in my server
Hero192 Posted February 2, 2016 Author Posted February 2, 2016 I think MySQL. i personally use it in my server How you control MySQL in your server?
Bonus Posted February 2, 2016 Posted February 2, 2016 I'm using dbConnect, dbPoll, dbExec, dbQuery ... https://wiki.multitheftauto.com/wiki/DbConnect https://wiki.multitheftauto.com/wiki/DbPoll https://wiki.multitheftauto.com/wiki/DbExec https://wiki.multitheftauto.com/wiki/DbQuery
Hero192 Posted February 2, 2016 Author Posted February 2, 2016 I'm using dbConnect, dbPoll, dbExec, dbQuery ...https://wiki.multitheftauto.com/wiki/DbConnect https://wiki.multitheftauto.com/wiki/DbPoll https://wiki.multitheftauto.com/wiki/DbExec https://wiki.multitheftauto.com/wiki/DbQuery Yes bonus I know how to Script with SQL language and use it in MTA but, I want to know how to control MySQL to my server? to see player's data
Sir.BEEF Posted February 2, 2016 Posted February 2, 2016 I'm using dbConnect, dbPoll, dbExec, dbQuery ...https://wiki.multitheftauto.com/wiki/DbConnect https://wiki.multitheftauto.com/wiki/DbPoll https://wiki.multitheftauto.com/wiki/DbExec https://wiki.multitheftauto.com/wiki/DbQuery Yes bonus I know how to Script with SQL language and use it in MTA but, I want to know how to control MySQL to my server? to see player's data if ( tostring ( get ( "CONNECTION_TYPE" ) ):lower() == "mysql" ) then outputConsole ( "Attempting to connect as MySQL... Please wait") db = dbConnect( "sqlite","data.db" ); elseif ( tostring ( get ( "CONNECTION_TYPE" ) ):lower() == "sqlite" ) then db = dbConnect ( "sqlite", tostring(get("DATABASE_NAME")) .. ".sql" ); else error ( tostring(get("CONNECTION_TYPE")) .. " is an invalid SQL connection -- valid: mysql, sqlite" ); end if not db then print ( "The database has failed to connect") return else print ( "Database has been connected") end function db_query ( ... ) local data = { ... } return dbPoll ( dbQuery ( db, ... ), - 1 ) end function db_exec ( ... ) return dbExec ( db, ... ); end thats not all of it, but i gave you little bit of mine continue if you know how. if not try to find one in the community.
Hero192 Posted February 2, 2016 Author Posted February 2, 2016 Thanks for the reply, but I won't codes, I want to know how to control MySQL to see player's data ! like when you use XAMPP
Sir.BEEF Posted February 2, 2016 Posted February 2, 2016 Thanks for the reply, but I won't codes, I want to know how to control MySQL to see player's data ! like when you use XAMPP Oh check the Data, open it with NotePad and you will find everything.
Hero192 Posted February 2, 2016 Author Posted February 2, 2016 Oh check the Data, open it with NotePad and you will find everything. Dude, do you have a server right? ok, how you see player's saved data, like weapons, money, cordinations(x,y,z).. in a panel like XAMPP.
Sir.BEEF Posted February 2, 2016 Posted February 2, 2016 OMG did you finish the MySQL? when you do you go to DATA SOMETHING CALLED DATA. AND then you find every thing. just scroll down and look for thing you want
Sir.BEEF Posted February 2, 2016 Posted February 2, 2016 local weapStats_ = { ['9mm'] = 0, ['silenced'] = 0, ['deagle'] = 0, ['shotgun'] = 0, ['combat_shotgun'] = 0, ['micro_smg'] = 0, ['mp5'] = 0, ['ak47'] = 0, ['m4'] = 0, ['tec-9'] = 0, ['sniper_rifle'] = 0 } function createAccount ( account ) if ( account and type ( account ) == 'string' ) then local plr = getPlayerFromAccount ( account ) local autoIP = "unknown" local autoSerial = "unknown" local weapStats = toJSON ( weapStats_ ) if plr and isElement ( plr ) then autoSerial = getPlayerSerial ( plr ) autoIP = getPlayerIP ( plr ) outputDebugString ( "NGSQL: Creating account "..account.." for player "..getPlayerName ( plr ).." (Serial: "..autoSerial.." || IP: "..autoIP..")" ) else outputDebugString ( "NGSQL: Creating account "..account.." for player N/A (Serial: None || IP: None)" ); end local today = exports['SAEGPlayerFunctions']:getToday ( ) return db_exec ( [[INSERT INTO `accountdata` (`Username`, `Money`, `Armour`, `Health`, `x`, `y`, `z`, `Skin`, `Interior`, `Dimension`, `Team`, `Job`, `Playtime_mins`, `JailTime`, `WL`, `Weapons`, `JobRank`, `GroupName`, `GroupRank`, `LastOnline`, `LastSerial`, `LastIP`, `Kills`, `Deaths`, `weapstats`, `items`, `unemployedskin`, `vip`, `vipexp`, `plrtosrvrsettings` ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? );]], account, '0', '0', '100', '0', '0', '0', '0', '0', '0', 'UnEmployed', 'UnEmployed', '0', '0', '0', '[ [ ] ]', 'None', 'None', 'None', today, autoSerial, autoIP, '0', '0', weapStats, toJSON ( { } ), '28', 'None', nil, toJSON ( { } ) ) end When you finish this you go to DATA and open it with Note pad you will find every thing
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