Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

2 years ago

Advertisement
August 24, 2019, 12:17:19 am

Author Topic: [Release] Advanced BuyMenu (Updated Release of BuyMenu)  (Read 24464 times)

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
[Release] Advanced BuyMenu (Updated Release of BuyMenu)
« on: March 26, 2014, 10:20:24 pm »
Advanced BuyMenu
ALL Vehicles, Templates, Decals, Custom Names, Left/Right/Primary Weapons, Rank/Permission System, Saved Colors, and Appearance system!
Version 1.1


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 who taught me how to add templates. From there I just kept advancing  8)

Note that this is an Updated Release of Urik's BuyMenu Edit. 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
Vehicle Templates & Decals!
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.

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

Comprehensive Appearance and Cosmetics System
By combining the concepts of Jman's Hat Demo 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.


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.
4-25-14 Made the three Rank system examples no longer active by default, now they are commented.

Enjoy!
« Last Edit: July 22, 2014, 05:55:23 am by JasonMRC »

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #1 on: March 26, 2014, 11:01:35 pm »
Excellent job, I was wondering when someone was going to release this :D

Very well done!

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #2 on: March 27, 2014, 09:24:36 am »
Ah,so you released it:)
Good. For everyone, this has been tested on my server aswell and it works flawless.

IceDragon

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #3 on: March 27, 2014, 10:10:40 pm »
This is very useful.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #4 on: March 30, 2014, 09:39:08 am »
Update: Fixed a module crashing bug in the color changed function. Only happened if a player attempted to change the color of their vehicle before they owned one.

Trip[ABK]

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #5 on: April 02, 2014, 06:03:31 pm »
nice work.  busy atm, but i will be sure to try and remember to add this to our server  8)

flyingman1900

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #6 on: April 18, 2014, 06:30:46 pm »
Can I have a version of this with the VIP/donor system disabled? This is a nice menu but I don't understand how to disable the rank thing.

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #7 on: April 18, 2014, 07:19:30 pm »
Can I have a version of this with the VIP/donor system disabled? This is a nice menu but I don't understand how to disable the rank thing.
By default the rank system is only active on the Tuk-Tuk Rickshaw, Razak, and the Arctic hat. This is as an example.
Code: [Select]
VehicleBuyMenuEntry( 9, 0, nil, nil, nil, 1 ),
-- ^ Tuk-Tuk Rickshaw
Simply remove that 1 and it will no longer require a rank.
Code: [Select]
VehicleBuyMenuEntry( 9, 0, nil, nil, nil ),
-- ^ Tuk-Tuk Rickshaw

Vehicles are only restricted if they have a number in the last field.

Noob-Floore

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #8 on: April 26, 2014, 01:21:38 am »
How come everything is free with me? even though the line :  self.price = price " is set to price..

Anyone else got this?

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #9 on: April 26, 2014, 04:14:24 am »
Because by default all of the vehicle's prices are set to 0. You can go in and set prices for each vehicle if you wish.

deathdragonaw

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #10 on: June 21, 2014, 11:03:47 pm »
How come everything is free with me? even though the line :  self.price = price " is set to price..

Anyone else got this?

For me it's also everything free, not only vehilces. Also, where can you set prices for the vehicles?

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #11 on: June 22, 2014, 08:43:05 am »
The reason all vehicles are free by default is because most people prefer a freeshop, so I just removed the prices. However y'alls responses seem to indicate you want the prices in there, but with a toggle to switch between free and cost.

Advanced Buy Menu 2.0 Intended Feature List:
Prices reinstated, admin toggle controlled.
Weapons saved, admin toggle controlled.
Updated and more efficient Appearance system. Mostly backend but allows the precise tweaking of every cosmetic's position.
Vehicle UnderGlow! Using the new ClientLight system.


Would Player Settable Player colors be desired? If so, should they save or only be temporary?

Release date is TBD.
To view these features as they are made, visit my server, Problem Solvers. Vehicle UnderGlow will be available on my server tomorrow night..

DaAlpha

  • Donator
  • Jr. Member
  • *****
  • Posts: 53
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #12 on: July 24, 2014, 04:23:57 am »
Does every decal still have an own entry? Because I hate that so many vehicles have 4 entries each for some decals which are barely ever used. My idea was that you have a tab behind the color tab for the vehicle decal where you can set a decal which will be applied to all of your vehicles. Options should be "Default", "Military" (MilStandard), "Japan" (OldJapan), "Reapers", "Roaches" and "UlarBoys".

Also, I do not know if it is known but when using the decal Taxi or Licenseplate, you can actually remove the decals on certain vehicles like the PVD, the Bering or the Amen 69. However, if you use it on vehicles like the Leopard or the Wilforce jeeps, it will kinda glitch out. They will have their default decal but it will disappear sometimes when moving the camera or the vehicle itself. Maybe you have a nice idea how to add this no decal-feature for those certain vehicles (Do not know them by heart, think it is 6 vehicles or so). On my server I have created a seperate tab in the vehicles section for those vehicles on which this trick works properly.

And you could add an option in the initiator to disable money completely. The option should remove the price column and the money display next to the spawn button completely and should set all prices to 0. Mister did that manually and so did I, but it would be way easier if there was an option for it, since most servers probably use free buy menus anyways.

Edit: Does ABM 2.0 also include the proper names for templated vehicles, like the MV Command? I have seen this on your server and I did it for mine manually.
« Last Edit: July 24, 2014, 04:29:43 am by DaAlpha »

JasonMRC

  • Donator
  • Hero Member
  • *****
  • Posts: 601
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #13 on: July 24, 2014, 11:00:45 pm »
Vehicles that support multiple Decals currently have 6 entries; None, Reapers, Roaches, Ular Boys, Military, and Japan. It is annoying having them each with their own and some of my players have asked about that. I could probably put together a dropdown or radio buttons to select custom decals.

Any Decal which isn't valid will often display no decal, but sometimes display the default decal.

I have a toggle to disable item costs. I have no intentions of removing the price columns as that seems unnecessary to me. I may give a brief lookover to see if it's easy to do, but if it requires re-writing lots of the GUI I won't be doing that.

ABM currently doesn't have the exact Vehicle names. I only have that in my common tag. I may go through and add these names before release, not sure.

DaAlpha

  • Donator
  • Jr. Member
  • *****
  • Posts: 53
    • View Profile
Re: [Release] Advanced BuyMenu (Updated Release of BuyMenu)
« Reply #14 on: July 25, 2014, 03:02:30 am »
Yeah, I would really appreciate a better way of choosing decals like that dropdown menu. Mister will not like it, since he thinks those additional entries make it look like there was a huge selection of vehicles :D

I removed those columns by commenting a few lines out, where they are created and referred. I think you could do it by just putting these lines into if-conditions which check if the option is true or false, should not be that big of a deal.

I would help you with the vehicle names, but as you know, I am far away from home. When I am back on tuesday and it is not done yet, I can do it for you.