Jump to content

Buyable Cars


MasterTobi

Recommended Posts

when i allways need to store a lot i first make the script save things to xml, for a couple of reasons, you cannot add a new colomn to the sql without compleatly creating the table again or editing the one you got in a browser, and in xml you can see things easier without opening the db file :) once you done make a convertor to copy all your cars and prices to sql by looping throught the xml :) if you need any help with a convertor when you made the script gimme a message on here and i will give you my msn.

Link to comment
...

you cannot add a new colomn to the sql without compleatly creating the table again or editing the one you got in a browser

I don't know if ALTER statement is usable in MTA because I never needed it in MTA, but that's what it's for.

http://www.w3schools.com/sql/sql_alter.asp

If you can edit a table in SQL database with SQL Database Browser then you can theoretically edit it with Lua script using executeSQLQuery

Link to comment
...

you cannot add a new colomn to the sql without compleatly creating the table again or editing the one you got in a browser

I don't know if ALTER statement is usable in MTA because I never needed it in MTA, but that's what it's for.

http://www.w3schools.com/sql/sql_alter.asp

If you can edit a table in SQL database with SQL Database Browser then you can theoretically edit it with Lua script using executeSQLQuery

Or better, bypass scripting for simple changes. MTAs SQL functions aren't that good, and tbh I don't trust them.

I use this program to create and edit my databases.

Link to comment

im just saying i tried to add a new column and when i did restart the gamemode it didnt do it so i had to ither make a compleatly different named table or deleate the table and create it again or add the column with the db browser, cause when you upload a script to the community then people expect it to work out the box and when you update it and say add another coloumn to the db people arnt going to have a clue how to add a new coloumn well some people anyway.

Link to comment

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...