2013martin1212 Posted December 25, 2016 Share Posted December 25, 2016 Hello all and happy xmas . Someone can explain me how i can make a car spawner in panel with mysql database like example if the player buy a car in the carshop the car was show in the panel and he can spawn and despawn i dont want to anyone to make me the script all i need is the examples or which programmer words need it of it and i try to create thanks all to help Link to comment
Rataj Posted December 25, 2016 Share Posted December 25, 2016 I will not make you "example" of whole resource, but if you really want to see an example, visit community.multitheftauto.com, it's highly possible, that somebody made something similar and released it to public. Also, if you want to make it yourself, take a look at Introduction to Scripting the GUI it can help you a lot in making GUI (panel). MySQL connection can be made using MTA MySQL (old module) or DbConnect (built-in function). Don't forget to use tables and element data. Link to comment
ViRuZGamiing Posted December 25, 2016 Share Posted December 25, 2016 I'd start without the SQL part, make a GUI Window with a gridlist with all the names of cars you'd like and set data to each gridlist row, if you select it you'd setElementModel (if you're always having a car shown) or do destroyObject and createVehicle Link to comment
Rataj Posted December 25, 2016 Share Posted December 25, 2016 9 hours ago, ViRuZGamiing said: I'd start without the SQL part, make a GUI Window with a gridlist with all the names of cars you'd like and set data to each gridlist row, if you select it you'd setElementModel (if you're always having a car shown) or do destroyObject and createVehicle * destroyElement (for clarity) 1 Link to comment
2013martin1212 Posted December 25, 2016 Author Share Posted December 25, 2016 Rataj i get that gui part but i dont want to a simple spawn system in here only shows and spawn those cars which was buyed from the player Link to comment
ViRuZGamiing Posted December 26, 2016 Share Posted December 26, 2016 3 hours ago, Rataj said: * destroyElement (for clarity) woops my bad, thx for correcting 1 hour ago, 2013martin1212 said: Rataj i get that gui part but i dont want to a simple spawn system in here only shows and spawn those cars which was buyed from the player yes you do want that, but you should work in smaller pieces instead of the big chunk. if you aren't able to. Make this. if it works add the rest. Link to comment
pa3ck Posted December 26, 2016 Share Posted December 26, 2016 (edited) Player logs in -> get owned vehicles list -> store them in a table -> trigger to client with the table content -> populate GUI from the table -> whenever the user click's a vehicle to spawn trigger to server with the details of that veh -> spawn the veh server-side Edited December 26, 2016 by pa3ck 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