Jump to content

Car spawn system help


2013martin1212

Recommended Posts

Hello all and happy xmas :D . 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

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

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