PivityGmodStore

How to configure the addon (#1)

Introducing the addon

Hi people!

In this topic, you will learn how to configure this addon. I didn't make this for the others because it was quite simple, but here I think it's really necessary since he will make the things more easier to understand.

First of all, you should know (if you have seen the medias) that a lot (almost 90%) of configuration is done in-game, however you should configure the configuration file first!

Open the file called gate_config.lua and configure it, then restart the server to be sure your changes have been applied. You will be able to select the langage in-game, but keep in mind that the configuration in the admin frames will be and will remain in english to avoid the translator's work because else it would add a lot of lines.

When you have restarted your server, you will be able to use the "Gate Placer" toolgun in the "Diablos Addon" category. Open your P menu and take this gate.

With the following text you will understand why parking, toll and everything in this script could only be configured by server owners for people in the server, but people can't create the systems by themselves when you'll understand how complex it could be for some people.

You can press left click where you want, we don't care currently. This frame will appear:

Normally, you should not have any group in the list and the only option offered at the beginning is the group creation. Let's create a group!


Group creation

The first question you probably have is what is the group we have to create? Like why we can't create gate directly?????

The answer is quite simple: a parking or a toll is a group of entities. In a parking, there are some gates, some machines. These things are parented and result of the same thing, that's why everything is unified through a group. If you want to create a parking onto your server, I think you prefer putting parking informations one time and then manage the gates and machines as you want, and with this script I avoid this. Group creation is simple, as everything when you understand how it works:

The frame above says that we are in front of a "ADMIN GROUP EDIT" because I was editing my group. If you create a group at the beginning, you will have the "ADMIN GROUP CREATION" message. All the frames work the same way: if you are editing something, you'll have the ID of the elements (here "Group #1") with the informations you had when you saved the informations.

A group allows you to configure:

  1. Whether machine is included or not. If the machine isn't included (it isn't checked), the informations below can't be accessed because we will be in front of automatic gates. An automatic gate detects when a vehicle is near it and will open when it's the case and closed when the vehicle crossed it. If you checked the machine Included checkbox, you will have:
  2. Toll. If you check it, you intend to create a toll with the price you can set below. If you set 0 to the price below, it's a free toll (which means it's only here for realism but people don't lose money so it doesn't really have sense). Else people will have to pay everytime they want to cross the gate. If you don't check it, you will be in front of a parking system and a "PRICES" button will appear. By clicking on it, you will have this frame at the right of the group creation:


This frame allows you to configure the prices you want for the time you want. When someone will enter in a parking with his car, the time will increase until he puts his (virtual) ticket in the Exit Machine. Here, I configured everything as if until 5 minutes, you pay $5. It means that if you are 4 minutes in the parking, you pay $5 either way but if you are 6 minutes on the place, you'll pay the price above which is the price for 8 minutes ($8). You can also set that for x minutes, it will be free by putting 0 for the "price" value.

If you are worried about putting a price everytime for every minute, you can put a "More time" price. You just have to fill as "Until 0 minutes, set the price to $20" and it will calculate the situation: the biggest time entered here is "until 10 minutes, price was set at $12" (lol no sense it should be to not at) so if your time in the parking is at more than 10 minutes, you'll pay the maximum price which is $20.

You are able to reset parking prices by clicking on the "RESET" button: however it will erase all lines so keep them in mind (was too lazy to make an "edit" value, will do if it's really requested).

When everything is configured, don't close the parking prices frame. It's really important. Just click on the group creation frame at the left and click on the "SAVE" (or EDIT if you edit a group) button you may have.

Right, so your group has been saved through a complex and non-understandable file in data/diablos/gate/<nameofthemap>.txt. You can return to the admin frame menu by pressing a left click where you want to create an entity. Let's say you want to create a billboard.


Billboard creation

A billboard is a parking-only feature. If you create a toll group, you will not be able to place billboards. A billboard is what contains the parking informations and prices.

You have to select the group in the list at the top left of your admin frame, and the "Billboard for a parking" button at the bottom left will turn green if it's a parking. Just click on it and you will be able to create a billboard with a really little configuration.

Yeah, the only thing you can configure is the billboard's header text. Again, my frame is in an edit case (as you can see with the text and the "Group #1 / Billboard #1" ) thing. Set the text you want and click on "SAVE" or "EDIT". The billboard will be created where you pressed the left click using the toolgun depending of your eye angle and with the header text you entered. You are able to change his position by using physgun but when you change the position of an entity, take again the toolgun, press left click on the entity and directly press the "EDIT" button to save the new pos!

Billboard has been created. Put them where you want. An advice could be the fact of writing things like "Hospital parking (30 meters)" or "Hospital parking (---->)" around the city to tell them where are the parkings.

Let's create the main part of the script: a gate.

Next part available here.