Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RS = {}
- -- Function to display notifications
- RS.notify = function(msg)
- SetNotificationTextEntry("STRING")
- AddTextComponentSubstringPlayerName(msg)
- DrawNotification(false, true)
- end
- -- Function to display help text
- RS.DisplayHelpText = function(str)
- BeginTextCommandDisplayHelp("STRING")
- AddTextComponentSubstringPlayerName(str)
- EndTextCommandDisplayHelp(0, false, true, -1)
- end
- -- Set the language (options: 'de', 'en', add more)
- RS.Language = 'de'
- -- Set the framework (options: 'auto', 'esx', 'qbcore')
- RS.Framework = "auto"
- -- Localization function
- function _U(msgKey, ...)
- local lang = RS.Language
- local message = Locales[lang][msgKey] or Locales['en'][msgKey]
- return string.format(message, ...)
- end
- -- Marker configuration
- RS.marker = {
- ['enabled'] = true,
- ['bobUpAndDown'] = true,
- ['faceCamera'] = true,
- ['rotate'] = false,
- ['drawDistance'] = 50,
- ['type'] = 21,
- ['color'] = {
- ['r'] = 0,
- ['g'] = 182,
- ['b'] = 242,
- ['a'] = 150
- },
- ['scale'] = {
- ['x'] = 1.0,
- ['y'] = 1.0,
- ['z'] = 1.0
- }
- }
- -- Processor configuration
- RS.processor = {
- {
- ['name'] = 'Kiesel',
- ['location'] = vector3(1211.1456, 1857.8119, 78.9115),
- ['helptext'] = 'Drücke E um Kiesel zu verarbeiten', -- "Press E to process Kiesel"
- ['blip'] = {
- ['name'] = 'Kiesel Verarbeiter', -- "Kiesel Processor"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 2,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Set to false to hide the blip even if the player has access
- ['required'] = {
- ['name'] = 'kiesel',
- ['label'] = 'Kiesel',
- ['amount'] = 10
- },
- ['receive'] = {
- ['name'] = 'sand',
- ['label'] = 'Sand',
- ['amount'] = 1
- },
- ['processing_time'] = 20, -- in seconds
- ['allowed_jobs'] = {'police'} -- Only players with the 'police' job can access
- },
- {
- ['name'] = 'Wassermelone | Boost',
- ['location'] = vector3(414.8102, -2052.6086, 22.1964),
- ['helptext'] = 'Drücke E um Wassermelone zu schneiden', -- "Press E to cut watermelon"
- ['blip'] = {
- ['name'] = 'Wassermelone Schneiden | Boost', -- "Watermelon Cutting | Boost"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 48,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Blip will be shown
- ['required'] = {
- ['name'] = 'wassermelone',
- ['label'] = 'Wassermelone',
- ['amount'] = 1
- },
- ['receive'] = {
- ['name'] = 'gwassermelone',
- ['label'] = 'Geschnittene Wassermelone', -- "Sliced Watermelon"
- ['amount'] = 4
- },
- ['processing_time'] = 60, -- in seconds
- ['allowed_jobs'] = {'police'} -- Only players with the 'police' job can access
- },
- {
- ['name'] = 'Eis Wassermelone | Boost',
- ['location'] = vector3(867.2131, -1640.2905, 30.1913),
- ['helptext'] = 'Drücke E um Wassermelone einzufrieren', -- "Press E to freeze watermelon"
- ['blip'] = {
- ['name'] = 'Wassermelone Einfrieren | Boost', -- "Watermelon Freezing | Boost"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 48,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Blip will be shown
- ['required'] = {
- ['name'] = 'gwassermelone',
- ['label'] = 'Geschnittene Wassermelone', -- "Sliced Watermelon"
- ['amount'] = 4
- },
- ['receive'] = {
- ['name'] = 'eiswassermelone',
- ['label'] = 'Wassermelonen Eis', -- "Watermelon Ice"
- ['amount'] = 4
- },
- ['processing_time'] = 3, -- in seconds
- ['allowed_jobs'] = {'police'} -- Only players with the 'police' job can access
- },
- {
- ['name'] = 'Erdbeeren',
- ['location'] = vector3(1792.1180, 4593.0049, 37.6825),
- ['helptext'] = 'Drücke E um deine Erdbeeren zu verarbeiten', -- "Press E to process your strawberries"
- ['blip'] = {
- ['name'] = 'Erdbeeren Verarbeiter', -- "Strawberry Processor"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 48,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Blip will be shown
- ['required'] = {
- ['name'] = 'erdbeeren',
- ['label'] = 'Erdbeeren', -- "Strawberries"
- ['amount'] = 4
- },
- ['receive'] = {
- ['name'] = 'erdbeerensm',
- ['label'] = 'Erdbeer Smoothie', -- "Strawberry Smoothie"
- ['amount'] = 1
- },
- ['processing_time'] = 25, -- in seconds
- ['allowed_jobs'] = {'police'} -- Only players with the 'police' job can access
- }
- }
- -- Seller configuration
- RS.seller = {
- {
- ['name'] = 'Sand',
- ['location'] = vector3(1708.4001, -1610.4089, 113.814),
- ['helptext'] = 'Drücke E um deinen Sand zu verkaufen', -- "Press E to sell your sand"
- ['blip'] = {
- ['name'] = 'Sand Käufer', -- "Sand Buyer"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 2,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Blip will be shown
- ['item'] = {
- ['name'] = 'sand',
- ['label'] = 'Sand',
- ['plural'] = 'Sand',
- ['min_price'] = 150,
- ['max_price'] = 250
- },
- ['sell_time'] = 10, -- in seconds
- ['payment_type'] = 'black_money', -- Options: 'cash', 'black_money', 'bank'
- ['allowed_jobs'] = {'police'} -- Only players with the 'police' job can access
- },
- {
- ['name'] = 'Wassermelone Eis | Boost',
- ['location'] = vector3(-1149.3453, -1602.1035, 4.3901),
- ['helptext'] = 'Drücke E um dein Eis zu verkaufen', -- "Press E to sell your ice cream"
- ['blip'] = {
- ['name'] = 'Eis Käufer | Boost', -- "Ice Cream Buyer | Boost"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 48,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Blip will not be shown
- ['item'] = {
- ['name'] = 'eiswassermelone',
- ['label'] = 'Wassermelonen Eis', -- "Watermelon Ice Cream"
- ['plural'] = 'Wassermelonen Eis',
- ['min_price'] = 150,
- ['max_price'] = 250
- },
- ['sell_time'] = 15, -- in seconds
- ['payment_type'] = 'cash', -- Options: 'cash', 'black_money', 'bank'
- ['allowed_jobs'] = {'police'} -- Only players with the 'police' job can access
- },
- {
- ['name'] = 'Erdbeer Smoothie',
- ['location'] = vector3(1263.5089, 3545.2148, 35.1600),
- ['helptext'] = 'Drücke E um deinen Erdbeer Smoothie zu verkaufen', -- "Press E to sell your strawberry smoothie"
- ['blip'] = {
- ['name'] = 'Smoothie Käufer', -- "Smoothie Buyer"
- ['sprite'] = 365,
- ['display'] = 4,
- ['scale'] = 1.0,
- ['color'] = 48,
- ['shortrange'] = true
- },
- ['showblip'] = true, -- Blip will be shown
- ['item'] = {
- ['name'] = 'erdbeerensm',
- ['label'] = 'Erdbeer Smoothie', -- "Strawberry Smoothie"
- ['plural'] = 'Erdbeer Smoothies',
- ['min_price'] = 150,
- ['max_price'] = 250
- },
- ['sell_time'] = 8, -- in seconds
- ['payment_type'] = 'cash', -- Options: 'cash', 'black_money', 'bank'
- ['allowed_jobs'] = {} -- Empty table means everyone can access
- }
- }
- -- Localization strings
- Locales = {
- ['de'] = {
- ['process_success'] = 'Du hast erfolgreich %sx %s verarbeitet.',
- ['process_fail'] = 'Fehler - Bitte versuche es erneut.',
- ['sell_success'] = 'Du hast %sx %s verkauft und dafür %s$ erhalten.',
- ['sell_fail'] = 'Fehler - Bitte versuche es erneut.',
- ['farm_start'] = 'Du hast angefangen, folgende Items zu farmen: %s.',
- ['farm_afk'] = 'AFK-Farming aktiviert: Du erhältst folgende Items alle %s Sekunden: %s.',
- ['farm_fail'] = 'Fehler - Du hast das Item nicht erhalten.',
- ['farm_afk_disabled'] = 'AFK-Farming deaktiviert: Du musst E drücken, um zu farmen.',
- ['farm_collect'] = 'Du hast folgende Items erhalten: %s.',
- ['farm_press_e'] = 'Drücke E, um erneut zu farmen.',
- ['farm_cancelled'] = 'Farmen abgebrochen.',
- ['need_car'] = 'Du benötigst ein Fahrzeug.',
- ['progressbar_farming'] = 'Farmen...',
- ['progressbar_afk_farming'] = 'AFK-Farmen...',
- ['tool_required'] = 'Du benötigst ein %s, um zu farmen.',
- ['event_bonus_item'] = 'Du hast ein Bonus-Item gefunden!',
- ['already_farming'] = 'Du farmst bereits.',
- ['need_tool'] = 'Du benötigst ein %s, um zu farmen.',
- ['interact_with_prop'] = 'Drücke ~INPUT_CONTEXT~ zum Farmen.',
- ['farming_started'] = 'Angefangen zu farmen.',
- ['farming_completed'] = 'Aufgehört zu farmen.',
- ['farming_failed'] = 'Farming fehlgeschlagen.',
- ['prop_respawn'] = 'Der Baum wird in %s Sekunden neu gespawnt.',
- ['received_item'] = 'Du hast %sx %s erhalten.',
- ['inventory_full'] = 'Dein Inventar ist voll.',
- ['no_access'] = 'Du hast keinen Zugriff auf diese Aktion.',
- },
- ['en'] = {
- ['process_success'] = 'You have successfully processed %sx %s.',
- ['process_fail'] = 'Error - Please try again.',
- ['sell_success'] = 'You have sold %sx %s and received %s$.',
- ['sell_fail'] = 'Error - Please try again.',
- ['farm_start'] = 'You have started farming the following items: %s.',
- ['farm_afk'] = 'AFK farming enabled: You will receive the following items every %s seconds: %s.',
- ['farm_fail'] = 'Error - You did not receive the item.',
- ['farm_afk_disabled'] = 'AFK farming disabled: You must press E to farm.',
- ['farm_collect'] = 'You have received the following items: %s.',
- ['farm_press_e'] = 'Press E to farm again.',
- ['farm_cancelled'] = 'Farming cancelled.',
- ['need_car'] = 'You need a vehicle to farm.',
- ['progressbar_farming'] = 'Farming...',
- ['progressbar_afk_farming'] = 'AFK Farming...',
- ['tool_required'] = 'You need a %s to farm.',
- ['event_bonus_item'] = 'You found a bonus item!',
- ['already_farming'] = 'You are already farming.',
- ['need_tool'] = 'You need a %s to farm.',
- ['interact_with_prop'] = 'Press ~INPUT_CONTEXT~ to farm.',
- ['farming_started'] = 'Started farming.',
- ['farming_completed'] = 'Stopped farming.',
- ['farming_failed'] = 'Farming failed.',
- ['prop_respawn'] = 'The tree will respawn in %s seconds.',
- ['received_item'] = 'You have received %sx %s.',
- ['inventory_full'] = 'Your inventory is full.',
- ['no_access'] = 'You do not have access to this action.',
- },
- }
- -- Custom progress bar configuration
- RS.UseCustomProgressBar = false
- RS.CustomProgressBar = {
- PushProgressbar = function(msg, time)
- exports["rs_notifypack_v2"]:PushProgressbar(msg, time)
- end,
- CancelProgressbar = function()
- exports["rs_notifypack_v2"]:CancelProgressbar()
- end
- }
- -- Function to detect the framework
- function DetectFramework()
- if RS.Framework == "auto" then
- if GetResourceState('es_extended') == 'started' then
- return 'esx'
- elseif GetResourceState('qb-core') == 'started' then
- return 'qbcore'
- else
- print("No Framework detected!")
- return nil
- end
- else
- return RS.Framework
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement