DarkRP F4 Customizable menu - Script
DarkRP F4 menu is a system to choose a job while staying informed about the important points of the job (Salary, Information, List of commands), editable in real time, without the need to restart your server. This allows you to easily modify the interface and increase the visibility of your important links and also the statistics on your servers.
❮
❯
Description of DarkRP F4 Customizable menu
๐ Presentation of DarkRP F4 Menu customizable
This F4 Menu is customizable in real time, it is designed for the different DarkRP (StarwarsRP, HogwartsRP, MangaRP, HaloRP, SchoolRP, MilitaryRP, StalkerRP , ect), like any F4 menu in DarkRP databases it allows users to change jobs, to have a view on the statistics, to view the job description to immerse themselves in the role and its history. They can access the shop that can be disabled in the configuration file, a customizable, fast commands shortcut system that can be used as a shortcut or reminder of what is possible to do on your server, all is filterable with an integrated search system, it includes a statistics system, configure the colors, title, banner image, color code that matches your project to the atmosphere of your DarkRP.
Since version 2.0 you don't need to publish your images on the workshop anymore, a simple link of an image published on imgur for example is enough, insert the link of image press enter and its done, the system doesn't use the content put on the workshop anymore which could cause pink and black textures when your manipulation was wrong in your F4 menu.
I filmed myself modifying a skin while trying to make themes. Some videos about the edition : StarwarsRP Skins F4 Menu or HogwartsRP ( Poudlard ) Skins F4 Menu
For performance, the user downloads the skin only once at his first connection. It is possible to disable the server side code and just customize the skin from the client side configuration file by copying the configuration made from the interface, so copy/paste the custom skin in the configuration file by clicking on a simple button.
๐ฆ Features
-Efficient and optimized customization system.
-Configures the Background images and the banners with a simple URL of image, (Not the workshop).
-System customization include in the panel and from the configuration file.
-Clean job descriptions when a day selects one.
-Statistics on DarkRP.
-Craft counter.
-Top connected players.
-Shop.
-Shortcut system for transforming commands into clickable buttons,w ith filterable visibility, per job and ulx ranking.
-Shortcut to open a support ticket on your server.
-Translated into several languages automatically: English, French, German, Russian, Spanish.
๐จ What is customizable?
-Edit the RGBA color codes of the different parts of the interface, panels, button, external border, internal window border.
-Edit in a dynamic way the background and the banner image in the F4 menu with a simple url of image.
-Edit the addition of buttons with clickable links: Your Website, Your Discord Link, Your Steam Group, Donation Page or Shop.
-Edit the size of the interface: Height, Width.
-Edit the title in the header of the interface.
-Edit the sound type when opening, closing the menu and when clicking on a button.
-Choose whether the F4 menu opens in fullscreen or according to your chosen size.
๐ Important points
Ability to disable server-side upgrade to only use client-side configuration from the configuration file.
Optimised method, which reduces the weight of the script to 85kb. Unlike the other F4 menu which weighs in at 850kb.
๐ The console commands
-Reset server-side settings: nord_f4_color_reset.
-Reset client-side settings: nord_f4_color_reset_clientside.
๐ Admin
-Automatic Backup.
-Access to the customization menu is only by the rank you saved in the configuration file, by default to admins and superadmins. If you don't have an admin system you can always add your SteamID in the config file.
๐พ Persistence
-Everything you add or remove is saved in real time in a system independent of all other systems to ensure compatibility and optimal performance.
๐ Installation
-Install the script in the / Steam / steamapps / common/ GarrysMod / garrysmod / addons file of your Gmod server, you will be able to use it by pressing the F4 button after a reboot.
-No DRM so no need to activate to use.
๐ Configuration
You will find the configuration file at this location: nordahl_f4_menu / lua / autorun / nordahl_f4_config.lua
โ Compatibility
Compatible with ULX, SAM, SERVEURGUARD, FADMIN.
Compatible with all DarkRP Mods, StarwarsRP, HogwartsRP, CityRP, gtaRP, AnimRP, MangaRP, ScoolRP, CloneRP, CloneRP, HaloRP, HarryPotterRP, PoudlardRP, MedievalRP, StalkerRP.
๐งฉ In the same collection
1. Customize the front page of your gmod server with ๐งฉ Gmod Server Title Screen Build
2. Customize your escape menu with ๐งฉ Gmod Escape Menu Editor
3. Customize your Deathscreen with ๐งฉ Gmod Deathscreen Customisable
4. Customize your scoreboard called tabmenu or Scoreboard with ๐งฉ Gmod Scoreboard Editable
5. Customize your F4 menu with ๐งฉ DarkRP F4 Menu customizable
Path: garrysmod/addons/nordahl_f4_menu
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2453425439 )
- To add gmod workshop resources to your collection : DarkRP F4 Customizable menu [Content Only] | Gmod Workshop
Then replace the variable nordahl_cfg_3906.skin
So:
enable_update_serverside_to_clientside = 0
Indicate the link of your image. To get it go to imgur, right click on the image, copy the link of the image.
Only admins will be able to change the background image of the F4 menu of your server. You can restrict the ranks in the configuration file.
If you have an image with a wrong texture pink and black it means that you have copied the link of the page and not the link of the image, you can make the difference by seeing the extension jpg or png at the end of the link. Since version 2.0 you don't need to store the image on your server, nor in your workshop collection.
Find the table : darkrp_commands_list
You can specify in the type variable of the command to add if it is a chat command, console command, function. You will find several pre-recorded examples to inspire you.
Example :
{ title="General",
cmds={
{type="function",name="Example 1",func=function()nordahl_cfg_3906.ChatMsg("This is a simple example can be edited in the config file")end},
{type="command",name="Drop money",desc="How much money would you like to drop?",cmd="say",arg1="/dropmoney"},
{type="command",name="Change RP Name",desc="Enter the RP Name you would like to have.",cmd="say",arg1="/rpname"},
{type="chat",name="Drop held weapon",arg="/drop"},
{type="ply_selection",name="Start demotion vote",desc="Enter a reason to demote",cmd="say",arg1="/demote"},
{type="chat",name="Sell all doors",arg="/unownalldoors"},
{type="chat",name="Request gun license",arg="/requestlicense"},
},
},
Find the table : darkrp_commands_list
Find the command group and add : job_access={["Mayor"]=1}
To add several jobs simply separate them with a comma, for example : job_access={["Mayor"]=1,["YourJob"]=1}
There's no limit.
Example for the Mayor's command list to be displayed only for the Mayors, (this avoids unnecessary command pollution of the interface for all the other users who are not in the Mayor group) :
{ title="Mayor Commands",
cmds={
{type="command",name="Start a lottery",desc="How much money should entering the lottery cost?",cmd="say",arg1="/lottery"},
{type="chat",name="Initiate lockdown",arg="/lockdown"},
{type="chat",name="End lockdown",arg="/unlockdown"},
{type="command",name="Introduce new law",desc="What law would you like to introduce?",cmd="say",arg1="/addlaw"},
},
job_access={["Mayor"]=1},
},
This example is already provided in the configuration file, you can modify it or use it as inspiration to add your own commands.
Find the table : darkrp_commands_list
Find or Create the group of commands you want to restrict and hide and add : group_access={["superadmin"]=1}
To add several ULX rows simply separate them with a comma, e.g : group_access={["superadmin"]=1,["admin"]=1}
Example for the superadmin command list to be displayed only for superadmin, this avoids unnecessary command pollution of the interface for all other users who are not the ulx superadmin rank:
{ title="- Superadmin Commands -",
cmds={
{type="command",name="Example 1",cmd="say",desc="Only Superadmin can see it in this example, you can edit in the config file"},
},
group_access={["superadmin"]=1},
},
This example is already provided in the configuration file, you can modify it or use it as inspiration to add your own commands.
Find the table : nordahl_cfg_3906.sound
nordahl_cfg_3906.sound={
openf4="ambient/machines/keyboard5_clicks.wav",
closef4="ambient/machines/keyboard4_clicks.wav",
press="ambient/machines/keyboard2_clicks.wav",
}
Find the variable : enable_BackgroundBlur
nordahl_cfg_3906.enable_BackgroundBlur=0 --Enabled= 1 / Disabled= 0
By default I have left my links there to serve as an example.
For example, to delete the Donate button, just insert an empty value in the field. Then the button will disappear until you set up a link. Just keep in mind that for a button without a link, it has no use so you don't need to display it.
If you have an image with an erroneous pink and black texture it means that the image is not in the location you have selected or the image does not exist on the client side so think about making it accessible to your users.
To share your textures there are two methods.
- Either via your Fastdl
- Either by including the content in your workshop package.
I have created a documentation on how to publish workshop content here : Wiki/En/Publish an addon on the Gmod workshop
This works best when the content exists on your customer's hard drive. ๐
You drag the image, once sent right click on the image > copy image link.
Please note that the image link is not the link to the page. The image link must end in .png or .jpg
Replace Trebuchet24 with the name of your font.
--Note:
--EXAMPLE with only one job: "Civil Protection"
--Line you need to add in jobrelated.lua:
Ligne 1 : customCheck
Ligne 2 : CustomCheckFailMsg = "You are not in the withelist !",
TEAM_POLICE = DarkRP.createJob("Civil Protection", {
color = Color(25, 25, 170, 255),
model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
description = [[The protector of every citizen that lives in the city.
You have the power to arrest criminals and protect innocents.
Hit a player with your arrest baton to put them in jail.
Bash a player with a stunstick and they may learn to obey the law.
The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
The Battering Ram can also unfreeze frozen props (if enabled).
Type /wanted to alert the public to the presence of a criminal.]],
weapons = {"arrest_stick", "door_ram", "weaponchecker"},
command = "cp",
max = 4,
salary = GAMEMODE.Config.normalsalary * 1.45,
admin = 0,
vote = true,
hasLicense = true,
ammo = {
]"pistol"] = 60,
},
category = "Civil Protection",
customCheck = function(ply) if CLIENT then return PlychangeAllowed(ply,"Civil Protection") else return true end end, --Respect capitalization and spaces!!!
CustomCheckFailMsg = "You are not in the withelist !",
})
-Why doesn't it work? If the original name of the job is "Civil Protection" you must respect it in its entirety.
Some bad examples:
--Bad capitalization: "civil protection"
--Spaces in the wrong place : "CivilProtection" or "Civil Protection" or "Civil Protection".
--Wrong job name, example: "Mayor".
Error that I see regularly that deserves its place here:
What is valid in the job name is "Civil Protection".
Some invalid examples:
"civil protection"
"CivilProtection"
" Civil Protection "
" Protection civile "
"Protection civile "
"Protection civile "
cfg.Hide_jobs_list=0
to 1.
To hide the economy button in the F4 menu, go to the script configuration file and find the table: cfg.Screen and go to the table line:
{id="economy",enabled=1,icon=Material("ngui/nordahl_f4/economy.png")},
Set enabled=1 to 0. This will disable the economy button.
cfg.jobgraph_in_home = 1
0 = Disable job graph in home table
1 = Enable
Only available since version 3.5 of the addon.
Tip to avoid the leak of DarkRP F4 Customizable menu installed on your Garry's Mod server: How avoid the Leak of your Gmod scripts
How Install an addon on Gmod? : How install an addon on Gmod
How Publish an addon on the Gmod workshop? : Documentation how create a content pack to publish on the workshop?
Creator: Norda Scripts
Sales | 184 |
Published | 4 years |
Last update | |
Version | version 4.0 |
DRM | Yes |
Categories | Gmod addons |
Requierements | Garry's Mod Server |
Languages | ๐ฌ๐ง ๐ซ๐ท ๐ฉ๐ช ๐ฌ๐ช ๐ฎ๐น ๐ฏ๐ต ๐ฐ๐ท ๐ณ๐ด ๐ท๐บ ๐ช๐ธ ๐ธ๐ช |
DarkRP Jobs VGUI Gameplay Management |