HeavyMetal Posted February 24, 2013 Share Posted February 24, 2013 hey im working on a resource that sell special upgrades for cars,upgrades that dont exist in game, and i need a way to save that relating it to the vehicle it was installed in, i know i can use setData but there is a problem, my server is not 24 hours, so when i save the cars with a script and open the server again, the vehicle data changes, it creates a identical vehicle with another data, so i dont know if i keep relating the upgrades with the data everytime the server is open sooner or later a car will be created with the id of a old car, and it will have the upgrade without buying it. any sugestions? is possible to save data on tables? i already tryed but i dont know how to compare it when loaded, it is not table, its not string and not number, so i dont know. Link to comment
tosfera Posted February 24, 2013 Share Posted February 24, 2013 The thing what I did with this was; I created a database table, inluding the model, x, y, z and the owner. (Also the upgrades). When the owner is spawning his car, he'll get a total new car with the same hpgrades. Try looking at this; executeSQLQuery I can write something like that for you tomorrow. Just pm me your skype, Im about to go sleeping. (On my phone atm) Link to comment
HeavyMetal Posted February 24, 2013 Author Share Posted February 24, 2013 ok but, as i said on the post, the upgrades that im trying to save are not the upgrades that exist in game, its a kind of bonus that you can buy like more health more armor, its a thing that i created and not the existent ones like spoiler and etc.. is possible for a data to repeat? a future car to have the same data number them an old one that exploded for example? Link to comment
pNine Posted February 25, 2013 Share Posted February 25, 2013 You can also save it on a xml file... Link to comment
HeavyMetal Posted February 25, 2013 Author Share Posted February 25, 2013 nice, i will read the wiki about that 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