Advanced BuyMenu
ALL Vehicles, Templates, Decals, Custom Names, Left/Right/Primary Weapons, Rank/Permission System, Saved Colors, and Appearance system!
Version 1.1
(http://s28.postimg.org/d788kr3il/Advanced_Buymenu_Splash.png) (http://s2.postimg.org/ak3ihnty1/Advanced_Buymenu_Splash.png)
Description
It seems like one of the best kept secrets in JC2-MP is the Vehicle Template and Decals. How do we apply these to vehicles in an easy and effective manner? For the longest time this has remained elusive. A large thanks goes to Eraknelo (http://www.jc-mp.com/forums/index.php?action=profile;u=22653) who taught me how to add templates. From there I just kept advancing 8)
Note that this is an Updated Release of Urik's (http://www.jc-mp.com/forums/index.php?action=profile;u=8751) BuyMenu Edit (http://www.jc-mp.com/forums/index.php/topic,3849.0.html). It's the same BuyMenu we're all accustomed to but updated with new features. Not trying to take any glory from Urik as his was a vital part in the Modern BuyMenu.
Features
(http://s13.postimg.org/8yn9zdm8n/ABMVehicles.png)
Vehicle Templates (http://wiki.jc-mp.com/Lua/Server/Vehicle/Functions/GetTemplate) & Decals (http://wiki.jc-mp.com/Lua/Server/Vehicle/Functions/GetDecal)!
Every Vehicle that can have a template or decal is already preset in the shared file. You can duplicate or remove lines as you like. For those that don't know, Decals are the Faction symbols: Military, Reapers, Roaches, and UlarBoys. Putting one of these in the appropriate field will spawn the vehicle with that symbol.
Custom Names
By default the vehicles display their Model Name. If a Template or Decal is added the name of that Template or Decal is added on to the name. If a custom name is defined then that is added on after the Model Name but before the Template and Decal.
(http://s13.postimg.org/qd7i7njdj/ABMWeapons.png)
Left & Right Hand Weapons
Some servers have dual wield, some don't. Now we all can. The weapons tab now has three tabs; Right Hand, Left Hand, and Primary. Unfortunately when actually dual wielding a weapon in each hand the left hand doesn't sync. This is something the Devs are working on.
Ranks and Permission System
Useful for restricting certain vehicles to certain people, such as staff only. Simply set a rank number on the vehicle line entry and then set the rank in the server file. By default ranks up to 5 are accepted. Only players on the 'VIP' list in the server file may buy items with a rank set. This system may be expanded easily.
Saved Colors
One of the most annoying things to me is that every time I join a server my vehicle color defaults back to white. Well Eraknelo (http://www.jc-mp.com/forums/index.php?action=profile;u=22653) also designed a save vehicle color system which is awesome. Simply set a color and the next time you login your color will be the same. By default your starting color is your Player Color. Just set a new color to change this.
(http://s13.postimg.org/5dreg5hp3/ABMAppearance.png)
Comprehensive Appearance and Cosmetics System
By combining the concepts of Jman's (http://www.jc-mp.com/forums/index.php?action=profile;u=47864) Hat Demo (http://www.jc-mp.com/forums/index.php/topic,4728.0.html) with the buymenu and SQL Database I have designed a comprehensive Appearance system. Currently there are items for the Head Slot, Covering Slot, Hair Slot, Face Slot, Neck Slot, and Back Slot. However I have coded functions in advance to handle Torso, Right Hand, Left Hand, Legs, Right Foot, and Left Foot as well. Simply add an appearance line in shared and change the slot name to the appropriate slot and your new item will show there. Each slot also has a 'Clear Slot' ability to remove any unwanted cosmetics in that slot. All items worn are saved and returned on re-entry.
Configuration
Like in the normal Buymenu, you can edit lines in the shared file.
Permissions are changed in the server file.
Please let me know of any bugs/glitches.
GitHub Download Link (https://github.com/Jasonmrc/AdvancedBuyMenu)
To see it in action, go to my server:
:: Problem Solvers FreePlay ::
IP Address: 216.108.230.23
Changelog
3-30-14 Fixed a major bug that would cause the module to crash if a player attempted to change the color of a vehicle before buying one. This was due to an improperly written function borrowed from Jman's Buymenu (https://github.com/Jman100/jc2mp-buymenu).
4-25-14 Made the three Rank system examples no longer active by default, now they are commented.
Enjoy!