MasterTobi Posted January 4, 2009 Share Posted January 4, 2009 Hey I am on look for one script, where one can buy cars as well as KIHC << this is good can you help me thx Link to comment
robhol Posted January 5, 2009 Share Posted January 5, 2009 Script it. I suggest reading about SQL functions, as this would be the best way of storing the data for each player. Link to comment
[UVA]Bart Posted January 9, 2009 Share Posted January 9, 2009 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
50p Posted January 10, 2009 Share Posted January 10, 2009 ...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
robhol Posted January 10, 2009 Share Posted January 10, 2009 ...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
[UVA]Bart Posted January 10, 2009 Share Posted January 10, 2009 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
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