Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Framework, frameworkName = getFramework()
- function addTarget(ped, coord, id)
- if Config.Target then
- exports.ox_target:addLocalEntity(ped, {
- {
- name = "open_craft_menu",
- event = "risk-craft:open",
- baran = "test",
- icon = "fas fa-gas-pump",
- label = getMessage('open_craft'),
- type = "client",
- job = false
- }
- })
- else
- lib.zones.sphere({
- coords = coord,
- radius = 2,
- debug = false,
- onEnter = function()
- lib.showTextUI(getMessage('open_craft'))
- end,
- onExit = function()
- lib.hideTextUI()
- end,
- inside = function()
- if IsControlJustPressed(0, 38) then
- lib.hideTextUI()
- TriggerEvent('risk-craft:open', id)
- end
- end,
- })
- end
- end
- function getMessage(message)
- return Config.Locales[Config.Language][message] or "Message Not Found: "..message
- end
- function notify(message)
- if frameworkName == "esx" then
- Framework.ShowNotification(getMessage(message))
- else
- Framework.Functions.Notify(getMessage(message))
- end
- end
Add Comment
Please, Sign In to add comment