ViRuZGamiing Posted December 21, 2013 Share Posted December 21, 2013 (edited) Hey Guys So I decided to rewrite this entire post because it was lacking a bit of information and formatting. Information First, the new version (4.1) requires my new script called simple-notifications which I made specific for this script to have some notifications. Inside the resource folder you will find a file called data.xml this file contains all the information on the garages/car dealerships. Youtube Preview https://www.youtube.com/watch?v=N_AaE4ZSfHc XML Structure <data> <garage x="-2068.6442871094" y="49.485717773438" z="28" width="51.8923339844" depth="48.108177185058" height="10"> <blip x="-2038.0665283203" y="82.775970458984" z="42" icon="55" size="2" r="255" g="0" b="0" a="255" ordering="0" distance="200" /> <spawnpoints> <spawnpoint name="spawn1" x="-2049.8791503906" y="56.531303405762" z="27.985414505005" rx="0" ry="0" rz="270" /> </spawnpoints> <vehicles> <vehicle name="Alpha" model="602" x="-2022.8159179688" y="84.669151306152" z="28" rx="0" ry="0" rz="270" price="1000" spawnpoint="spawn1" /> </vehicles> </garage> </data> This explanation will require a basic understanding of XML. - garage: Cuboid zone that handles all cars inside x: The X position of the garage's western side y: The Y position of the garage's southern side z: The Z position of the garage's lowest side width: The garage's width depth: The garage's depth height: The garage's height - blip: this should be self explanatory (createBlip) - spawnpoints: list of spawnpoints with name, minimum 1 required - spawnpoint: spawnpoint information name: required name can be anything x, y, z: Position coordinates rx, ry, rz: Rotation coordinates - vehicles: list of all the vehicles in the store - vehicle: vehicle information name: Display name for the UI elements model: modelID, x, y, z: Position coordinates rx, ry, rz: Rotation coordinates price: price spawnpoint: name of the spawnpoint (can be left out, first spawnpoint in list will be used) Requirements • simple-notifications (separate script by me) • min client version of 1.5.6-9.14370 Download https://community.multitheftauto.com/index.php?p=resources&s=details&id=8406 Quote Special thanks to: • IIYAMA for getting me into programming • Bandi94 helped me in the first versions on how to get started with dxDraw • Castillo's suggestion for using an XML Edited November 22, 2020 by ViRuZGamiing added link to youtube video Link to comment
Castillo Posted December 21, 2013 Share Posted December 21, 2013 Maybe for the next version, you should make the vehicles on a XML file or a table, it would be a lot easier to add/remove vehicles. Link to comment
ViRuZGamiing Posted December 21, 2013 Author Share Posted December 21, 2013 Maybe for the next version, you should make the vehicles on a XML file or a table, it would be a lot easier to add/remove vehicles. Great idea BUT i don't have any idea how to connect a Lua with an XML File. (exept of Meta) Link to comment
ViRuZGamiing Posted December 21, 2013 Author Share Posted December 21, 2013 IIYAMA found some bugs, Updating now! Link to comment
ViRuZGamiing Posted December 21, 2013 Author Share Posted December 21, 2013 very nice.. (Y) Thanks Link to comment
xXMADEXx Posted December 22, 2013 Share Posted December 22, 2013 Maybe for the next version, you should make the vehicles on a XML file or a table, it would be a lot easier to add/remove vehicles. Great idea BUT i don't have any idea how to connect a Lua with an XML File. (exept of Meta) A table would work just as good. Link to comment
ViRuZGamiing Posted December 22, 2013 Author Share Posted December 22, 2013 • Fixed some bugs • Added Col zone + dxDraw Message Link to comment
ViRuZGamiing Posted January 1, 2014 Author Share Posted January 1, 2014 UPDATED! Huge thanks to IIYAMA who learned me scripting and especial the Tables. • Added Blip till 200m visible • Added Table to add Vehicles, Vehicles spawnpoints and Prices Link to comment
ViRuZGamiing Posted June 4, 2014 Author Share Posted June 4, 2014 Fixed a bug and uploaded a fixed version. Link to comment
Wisam Posted June 4, 2014 Share Posted June 4, 2014 Nice one and i agree with Solidsnake, making the vehicles on xml file is the easist to edit/add vehicles and some suggestions: - a GUI for players to spawn/hide the vehicles and saved to the account - Ability to sell the cars the players bought for the half of the price - Make multiple shops that contain different kind of vehicles (e.g aircraft, bikes, cars..etc) I hope you add those in the future verison good luck Link to comment
ViRuZGamiing Posted June 5, 2014 Author Share Posted June 5, 2014 Thx for the suggestion i'll try and learn some new stuff to improve it like you said. XML would be easier but it's hard to learn. Adding multiple shops is already possible in the code but i'll put some new ones in. I'll keep you updated! Link to comment
Captain Cody Posted August 20, 2014 Share Posted August 20, 2014 It would be good if you made it so u can edit the cars in the shop ingame Link to comment
ViRuZGamiing Posted November 10, 2014 Author Share Posted November 10, 2014 It would be good if you made it so u can edit the cars in the shop ingame Thanks for the suggestion, i'll be working on it as i'm now done with the bug fixes I found. Link to comment
ViRuZGamiing Posted November 10, 2014 Author Share Posted November 10, 2014 It would be good if you made it so u can edit the cars in the shop ingame It's updated, I've made it so u can edit vehicles and prices ingame, later on i'll try and make it a dropdown list instead of a edit field where u need to know the id's. regards ViRuZ Link to comment
ViRuZGamiing Posted November 22, 2014 Author Share Posted November 22, 2014 I've made a video with a new update which is not released yet do you guys want it or not, any improvements, reply your ideas! Link to comment
Wisam Posted December 7, 2014 Share Posted December 7, 2014 Thats very nice.. but if you add the ability to spawn/hide the cars you buy whenever you want with SQLite database it will be awesome Link to comment
ViRuZGamiing Posted December 8, 2014 Author Share Posted December 8, 2014 Thats very nice.. but if you add the ability to spawn/hide the cars you buy whenever you want with SQLite database it will be awesome Yes, I'm aware of it, many players request SQL and it's something great I can use except I need to learn it first. Link to comment
ViRuZGamiing Posted November 11, 2020 Author Share Posted November 11, 2020 Hi guys After 6 years I've decided to rewrite my script and improve on it as well Changelog • removed GUI Control Panel • removed dxDraw messages • Dynamic XML File to add as many car dealerships as you want • A lot of bug fixes and code optimizations (I was ashamed of looking my code) Roadmap (if I get to it) • Add new UI (GUI/dxDraw) elements • Add a new control panel Example of the XML File 1 Link to comment
ViRuZGamiing Posted November 22, 2020 Author Share Posted November 22, 2020 Appears it's still addicting to write resources for MTA:SA after all that time haha, new update Changelog 4.1 • Added new UI elements (requires simple-notifications resource) • Minimum client version of 1.5.6-9.14370 • Forum post is also reworked and new YouTube video has been added Link to comment
Administrators Tut Posted November 22, 2020 Administrators Share Posted November 22, 2020 A blast from the past indeed! It's great to see old projects being continued. 1 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