Cronoss Posted February 5, 2022 Posted February 5, 2022 I don't know if this is the right topic for a question like this but I don't know where to ask I want to know what's the difference between saving the data in internal.db (simple script) function guardarDinero() cuenta = getPlayerAccount(source) setAccountData(cuenta, "dinero", tostring (getPlayerMoney(source))) end addEventHandler("onPlayerQuit", getRootElement(), guardarDinero) And creating a ".db" archive, using a script like this (script every command for the database): local db = dbConnect("sqlite", "test.db") function addDATA(sourcePlayer) dbExec (db, "INSERT INTO info (id_player, id_vehicle, color) VALUES(1, 401, ?", color) -------etc Because I've seen people telling other users that should learn about sql, and that kind of stuff
Moderators IIYAMA Posted February 6, 2022 Moderators Posted February 6, 2022 2 hours ago, Cronoss said: I don't know if this is the right topic for a question like this but I don't know where to ask I want to know what's the difference between saving the data in internal.db (simple script) function guardarDinero() cuenta = getPlayerAccount(source) setAccountData(cuenta, "dinero", tostring (getPlayerMoney(source))) end addEventHandler("onPlayerQuit", getRootElement(), guardarDinero) And creating a ".db" archive, using a script like this (script every command for the database): local db = dbConnect("sqlite", "test.db") function addDATA(sourcePlayer) dbExec (db, "INSERT INTO info (id_player, id_vehicle, color) VALUES(1, 401, ?", color) -------etc Because I've seen people telling other users that should learn about sql, and that kind of stuff Account data is a database interface and manager for ONLY account-bounded-data. dbConnect + all other db functions, allows you to create your own database interface and manager. This gives you a lot of freedom, but it also means that you have to write a lot yourself. 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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