Lloyd Logan Posted January 13, 2013 Posted January 13, 2013 Hi, I created a topic on this ages ago, but I never found my answer! In big scripts Such as vG, MTA:RP, Vedic etc. there is a folder called mysql, without this the resources using mysql wouldn't work. How do i connect my server to mysql? I am using it as a simple storage. People said to execute querys and stuff, but how does my server get a resource like "mysql"? I am using XAMPP, i have the modules, how to I "integrate MTA SERVER with MySQL? Thanks Lloyd If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Raahim Posted January 13, 2013 Posted January 13, 2013 Just to let you know, if the scripts are Illegal ones, no one would help you. Join the Network of Entertainment and Gaming Join No Bullsh*t Gaming (Replace the '*' with an 'i') 8x 16 Slot servers for free! gta-servers.net giveaway! Sane Hosting - Reliable & Cheap Game Servers and Reseller Package
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 Just to let you know, if the scripts are Illegal ones, no one would help you. I'm not using the scripts, i am creating a server from scratch, just giving people an example of what i am talking about! If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 13, 2013 Posted January 13, 2013 You don't need a resource called "mysql", you can do it however you want, although, you should make one resource which is used to connect to mysql and export the connection so you can use it on different resources. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
csiguusz Posted January 13, 2013 Posted January 13, 2013 You dont have to "connect your server to mysql". Just the scripts can connect to a database or éven use a database file to store there information. For example check the dbConnect function. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 You don't need a resource called "mysql", you can do it however you want, although, you should make one resource which is used to connect to mysql and export the connection so you can use it on different resources. Well how would i do that? i am wanting to use a DB? If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 13, 2013 Posted January 13, 2013 As the person above said, you must connect to mysql with dbConnect. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 As the person above said, you must connect to mysql with dbConnect. But how would i use this in a script? dbConnect . How do i connect it to localhost? Sorry If i am being ignorant, I'm just not too sure about MySQL If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 As the person above said, you must connect to mysql with dbConnect. But how would i use this in a script? dbConnect . How do i connect it to localhost? Sorry If i am being ignorant, I'm just not too sure about MySQL If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 13, 2013 Posted January 13, 2013 Click it, it has examples. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 Click it, it has examples. **facepalm** Sorry! So will i need the modules for this to work? If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
csiguusz Posted January 13, 2013 Posted January 13, 2013 Click it, it has examples. **facepalm** Sorry! So will i need the modules for this to work? No. dbConnect is a built-in mta function. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
Lloyd Logan Posted January 13, 2013 Author Posted January 13, 2013 Click it, it has examples. **facepalm** Sorry! So will i need the modules for this to work? No. dbConnect is a built-in mta function. So if this were the line in my mysql folder, test_db = dbConnect( "mysql", "dbname=testdb;host=127.0.0.1", "-----", "---------", "share=1" ) If I made a login panel, would it all be in the login resource? such as : executeSQLQuery("INSERT INTO accounts(account,pass,) VALUES(?,?,?)", playerAccount, playerPassword) Would this be correct in my login_client script? If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Castillo Posted January 13, 2013 Posted January 13, 2013 No, executeSQLQuery is for the built-in SQLite of MTA, you must use: dbExec San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
csiguusz Posted January 13, 2013 Posted January 13, 2013 No, executeSQLQuery is for the built-in SQLite of MTA True, but isn't it easier to use this db for the first time? Btw with this function the datas are stored in the registry.db in the deathmatch folder. Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
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