Sup, snailers!
Does your server need some information stands for player jobs or locations?
Well look no further than K_DISPLAY!
What does this script do?
- This script adds information panels that can display and be controlled/edited ingame!
- You can setup an infinite amount of unique information displays for your players to use!
What can players do?
- If you have jobs in your server you could limit sign editing to a certain job and rank this would provide an extra realism option to player jobs and make it easier for them to provide information about there job for example: Prices, Opening times and Events
- Players can use and view any panel but if you have a display job locked only people with a certain job can edit these displays
What can i control?
- You can control a whole lot, All framework parts are open so there should be no problem editing those, there are also ways to remove parts of the script entirely for example if you want to remove the whole image display stuff and have it so when you interact with a display it does something else like setting a job or teleporting and ect
Config File
Config = {}
Config.Variables = {
Debug = false,
Framework = 'QB', -- QB/ESX/None
Notify = 'QB', -- QB/ESX/Custom -- custom function below
UsingTarget = true, TargetResourceName = 'qb-target',
EnableJobRestrictFeature = true, --Disable job requirements fully (no menu to select a job)
UseCommand = false,
InteractionRange = 4.0
}
Config.MenuItems = {
displayScreen = {
{type = 'input', label = 'Image URL', description = 'Some input description', required = true},
{type = 'number', label = 'Width', description = 'Width', icon = 'hashtag', required = true, min = 1, max = 1920},
{type = 'number', label = 'Height', description = 'Height', icon = 'hashtag', required = true, min = 1, max = 1080},
},
panelAmount = {
{type = 'number', label = 'Number', description = 'Amount of images inside panel', required = true,min = 1, max = 20},
},
panelImages = {type = 'input', label = 'Image URL', description = 'Image URL [PNG, JPG, GIF]', required = true},
panelEdit = {type = 'input', placeholder = 'IMAGE URL', default = q, label = 'Image URL', description = 'Image URL [PNG, JPG, GIF]', required = false},
panelText = {
panelOpen = 'Open Panel',
panelEdit = 'Edit Panel',
intPanel = '[E] - Open panel [G] - Edit panel' -- if not using target
},
panelJob = {
{type = 'input', label = 'Job name', description = 'Shortname [police, mechanic, unemployed, ect]', default='none', required = true},
{type = 'number', label = 'Rank', description = 'Job Rank', icon = 'hashtag', default=0, required = true, min = 0, max = 999},
},
rotationText = [[Position:
[←] Left/Right Arrow [→]
[E] Place Display]],
panelPickup = {type = 'checkbox', label = 'Pickup'},
cantDo = 'You cannot do this.',
displayText = 'Display Screen',
amountText = 'Panel Image Amount',
setupImagesText = 'Panel Images Setup',
jobText = 'Job details'
}
Config.Controls = {
panelControls = {
openPanel = 51,
editPanel = 58,
placePanel = 38,
}
}
if not IsDuplicityVersion() then --Client Side
function TargetSetup(entity, objectData)
exports[Config.Variables.TargetResourceName]:AddTargetEntity(entity, {
options = {
{
type = "client",
event = "k_displaystand:openpage",
icon = "fas fa-box-circle-check",
label = Config.MenuItems.panelText.panelOpen,
obj = objectData
},
{
type = "client",
event = "k_displaystand:openpageEdit",
icon = "fas fa-box-circle-check",
label = Config.MenuItems.panelText.panelEdit,
obj = objectData
},
},
distance = 10.0
})
end
if Config.Variables.useCommand then
RegisterCommand('createStand', function(source, args)
TriggerEvent('k_displaystand:createStand')
end)
end
function OpenPage(images, displayStandData) -- You could use this to add your own menus?
--[[
displayStandData has the same structure as savePanels.json entries you can use this to get more info if needed
]]
SetNuiFocus(1, 1)
SendNUIMessage({
action = "open",
pages = images
})
end
function isNearbyADisplay(displayItemData)
--fires once when nearby a display
print('nearby')
end
function Notify(text, type)
lib.notify({
title = 'Display Stand',
description = text,
position = 'bottom',
type = type
})
end
else
function DropExploiter(src)
DropPlayer(src, 'stinky cheetor')
end
end
Preview it here:
Showcase
Get the script here:
KBase Display Stands
My other scripts
K_Diseases | Diseases/Illnesses/Sick/Medicine
HygieneV | Pee/Poop/Shower/Bath/Porta Pottie
K_FRAUD | ATM/CHECK/CARD FRAUD
SpinTheBottle | FiveM Spin the bottle Script
[Standalone] K_HULK | Be The Incredible Hulk!
[QB] K_BMX | Pickup BMX’s | Store them on back!
K_FOOTBALL | American Football / Rugby
More on KBase
Code is accessible | No |
Subscription-based | No, although subscription tier is available |
Lines (approximately) | 1,100* |
Requirements | ox_lib |
Support | Yes |