04.04.2016, 21:36
(
Last edited by Private200; 04/05/2016 at 09:43 PM.
)
DYNAMIC
Vehicle & Dealership

_________________________________________________
Introduction
• I started this project as one of my first dynamic systems. I had given this one a try long time before, using Y_INI, however, it didn't work out as expected. It was wasting way too many resources for something that could've been done easily using MySQL. As I am not an professional MySQL programmer, thought of giving SQL a try. I'd really like to give a big shout and thank to Gammix, this project would not be as cool as it is if it wouldn't be for him.
Credits
• Gammix: The project was pretty plain before I used his dialogs. There wasn't anything special other than an old school MSGBOX dialog. Thanks to his dialogs include (included in the package), I could give 'style' to the dialog, making it have this awesome design it currently has. He has also helped me with code snippets, so yeah, a big shout to him! Shall not forget about his easyDB include![/B]
• ZCMD: Command processing
• Incognito: Streamer for dynamic checkpoints
• ******: Sscanf
• SAMP: Pawno
Explanations and examples
RCON COMMANDS:
• /createdealership [dealership name] - Creates a dealership, you name it.
• /addvehicle [model] [price] [dealership name] - Creates a vehicle, adding it into the dealership using the model for the car and the price to buy. ONLY ONE CAR OF THE SAME MODEL CAN BE ADDED PER DEALERSHIP!
• /deletevehicle [model] [dealership name] - deletes a vehicle (reference: model) from a specific dealership
• /dealershipcars [dealership name] - checks all the cars in a dealership (MAX 24 cars per dealership!)
PLAYER COMMANDS:
• /buypark - Chooses a new parking spot for the vehicle
• /park - parks the vehicle and makes it disappear after
• /mycars - shows a list of all the cars you have (max. of a 5 vehicles can be bought)
• /buycar - allows you to buy a vehicle while in range of a dealership
IMPORTANT NOTE
HOW TO ADD A DEALERSHIP
As there will be multiple dealerships, it is not right for the script to have a specific location for the dealership, therefore I've added an option that allows the user to chose the dealership and configure it himself. I've already made an example using "Grotti", dealership created and used in the video below as well:
What each of those coordinates means is already explained in the script as well, however, here we go again:
NOTE: You must be using the name you used for the dealership in the database as that's how the script connects the enum with the database and retrieves the vehicles from the table. If the dealership name in the script is not the same with the dealership name in the database, server issues and problems may show up! YOU HAVE BEEN WARNED.
Video & pictures
Sorry for the noise in the background, including breathing. Forgot to mute mic.
Dealership buying menu isn't shown, but it's same as /mycars.
[ame]http://www.youtube.com/watch?v=2RKB8JVxv8k[/ame]
Download and virustotal
PasteBin: http://pastebin.com/t1APeCX1
Mega.NZ Mirror [RAR PACKAGE]: https://mega.nz/#!211wyQIL!HMVKoPiMI...9tDSCpuzJM8AP8
RAR: http://www.solidfiles.com/v/BqWxM8eZVXx66
(easyDB is included as it is modified to fit my needs)
VirusTotal: https://virustotal.com/en/file/a69d3...is/1459804445/
(for some reasons my chrome marked the file as malicious when downloading, so I added this to make sure there's nothing wrong with it)
Vehicle & Dealership

_________________________________________________
Introduction
• I started this project as one of my first dynamic systems. I had given this one a try long time before, using Y_INI, however, it didn't work out as expected. It was wasting way too many resources for something that could've been done easily using MySQL. As I am not an professional MySQL programmer, thought of giving SQL a try. I'd really like to give a big shout and thank to Gammix, this project would not be as cool as it is if it wouldn't be for him.
Credits
• Gammix: The project was pretty plain before I used his dialogs. There wasn't anything special other than an old school MSGBOX dialog. Thanks to his dialogs include (included in the package), I could give 'style' to the dialog, making it have this awesome design it currently has. He has also helped me with code snippets, so yeah, a big shout to him! Shall not forget about his easyDB include![/B]
• ZCMD: Command processing
• Incognito: Streamer for dynamic checkpoints
• ******: Sscanf
• SAMP: Pawno
Explanations and examples
RCON COMMANDS:
• /createdealership [dealership name] - Creates a dealership, you name it.
• /addvehicle [model] [price] [dealership name] - Creates a vehicle, adding it into the dealership using the model for the car and the price to buy. ONLY ONE CAR OF THE SAME MODEL CAN BE ADDED PER DEALERSHIP!
• /deletevehicle [model] [dealership name] - deletes a vehicle (reference: model) from a specific dealership
• /dealershipcars [dealership name] - checks all the cars in a dealership (MAX 24 cars per dealership!)
PLAYER COMMANDS:
• /buypark - Chooses a new parking spot for the vehicle
• /park - parks the vehicle and makes it disappear after
• /mycars - shows a list of all the cars you have (max. of a 5 vehicles can be bought)
• /buycar - allows you to buy a vehicle while in range of a dealership
IMPORTANT NOTE
HOW TO ADD A DEALERSHIP
As there will be multiple dealerships, it is not right for the script to have a specific location for the dealership, therefore I've added an option that allows the user to chose the dealership and configure it himself. I've already made an example using "Grotti", dealership created and used in the video below as well:
pawn Code:
new DealershipLocations[][DealershipInfo] =
{
{542.9274,-1292.7112,17.2422, 526.5967,-1284.5935,16.9692, "Grotti"}
};
Code:
PosX ( Range of point for player to buy car) PosY PosZ ___________________________________________ SpawnX ( Positions where cars will spawn after buying ) SpawnY SpawnZ ___________________________________________ Dealership name (describes itself || MUST BE DEALERSHIP DATABASE NAME!)
Video & pictures
Sorry for the noise in the background, including breathing. Forgot to mute mic.
Dealership buying menu isn't shown, but it's same as /mycars.
[ame]http://www.youtube.com/watch?v=2RKB8JVxv8k[/ame]
Download and virustotal
PasteBin: http://pastebin.com/t1APeCX1
Mega.NZ Mirror [RAR PACKAGE]: https://mega.nz/#!211wyQIL!HMVKoPiMI...9tDSCpuzJM8AP8
RAR: http://www.solidfiles.com/v/BqWxM8eZVXx66
(easyDB is included as it is modified to fit my needs)
VirusTotal: https://virustotal.com/en/file/a69d3...is/1459804445/
(for some reasons my chrome marked the file as malicious when downloading, so I added this to make sure there's nothing wrong with it)