# \[QB/ESX] Business Promotion \[PAID]

<figure><img src="/files/QUk6jOcLxnBCSuLpbBKz" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This script allows you to do /promotion (text) with the required job & job role that will then display a notification on screen to everybody in the server, in regards to promoting their business to announce anything (event/business opening etc..)

<img src="https://dunb17ur4ymx4.cloudfront.net/wysiwyg/1233912/b18993e78e861aef3a312e922499e6d7515237e7.png" alt="" data-size="original">
{% endhint %}

<figure><img src="/files/DFHJUGMsoanVW7HQYe8v" alt=""><figcaption></figcaption></figure>

* <mark style="color:orange;">Configurable allowed jobs.</mark>
* <mark style="color:orange;">Configurable promotional costs for each job.</mark>
* <mark style="color:orange;">Configurable job grade to be able to promote.</mark>
* <mark style="color:orange;">Configurable text (language).</mark>
* <mark style="color:orange;">Configurable blacklisted words in message.</mark>
* <mark style="color:orange;">Configurable cooldown.</mark>
* <mark style="color:orange;">Configurable amber-alert.</mark>

> /promotion (text) - display notification to everybody in the city.

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

<figure><img src="/files/LhinZZRSRrF3cHV4BUcL" alt=""><figcaption></figcaption></figure>

* This resource is drag/drop. Make sure to choose your framework inside of the config. You will just need to add the following inside of your server.cfg after you've dropped the file into your resources.

> <mark style="color:orange;">ensure adminplus-promotion</mark>

{% hint style="warning" %}
Feel free to check the config.lua & customize what jobs have access, the job grade, the pricing & also the cooldown.
{% endhint %}

```lua
-- ███████████████████████████████████████████████████████████████████████████ --                                                                                                                                  

Config = {}

Config.Framework = 1 -- (ESX == 1), (QB == 2)
Config.FrameworkExport = 'es_extended' -- (ESX == 'es_extended'), (QB == 'qb-core' - if QB comment the es_extended line in shared_scripts in fxmanifest.lua, add -- before the '@es_extended')

-- Ox_lib notification to everybody
Config.Ox_LibNotify = false
Config.ChatMessage = true

-- position?: 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'
Config.NotifyPosition = 'bottom-right'
Config.Icon = 'business-time'
Config.BusinessIcon = 'rectangle-ad'

-- LBPHONE EMERGENCY ALERT INTEGRATION
Config.EmergencyAlert = false -- player must have phone to receive the messages
Config.EmergencyAlertCommand = 'emergencyalert'
Config.AuthorizedJobs = { -- list of jobs that can use the command and required grade
    [1] = {job = 'police', grade = 0},
    --[2] = {job = 'ambulance', grade = 0},
}

---

-- I recommend to choose one of these.
Config.LbPhone = {
  Birdy = false,
  InstaPic = false,
  YellowPages = false,
  Marketplace = false,
  Mail = false,
}

Config.AllowedJobs = {
  ["rea"] = true,
  ["mechanic"] = true,
}

Config.RequiredGrade = {
  ["rea"] = 3,
  ["mechanic"] = 0,
}

Config.PromotionCosts = {
  ["rea"] = 100,
  ["mechanic"] = 150,
}

Config.BlacklistWords = {
  "nigger",
  "niggr",
  "n1gger",
  "n1gg3r",
  "ngger",
  "n1ger",
  "n1g3r",
  "nigg3r",
  "ng3r",
  "nger",
  "faggot",
  "f@gg0t",
  "fag",
  "f@g",
  "fag0t",
  "fagot",
  "fagg0t",
  -- Add more blacklist words here
}

Config.CooldownTime = 0  -- Cooldown time in seconds

Config.Strings = {
  emergency_alert = 'Emergency Alert',
  you_are_not_allowed_emergencyalert = 'You are not allowed to use emergency-alert.',
  business_promotion = 'Business Promotion',
  -- This one is for server-side that will show job name next to it.
  business_promotion2 = 'Business Promotion - ',
  job = 'Job: ',
  wait_for_promotion = 'Please wait before promoting your business again.',
  blacklisted_words = 'Your message contains a blacklisted-word.',
  not_enough_money = 'You do not have enough money to promote your business.',
  not_required_job_grade = 'You do not have the required job grade to promote your business.',
  you_are_not_allowed = 'You are not allowed to promote your business.',
  not_enough_cash = 'You do not have enough cash.',
  player_not_found = 'Player not found.'
}

-- ███████████████████████████████████████████████████████████████████████████ --
```

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

<figure><img src="/files/cSa9GTZM3fGHbSakyouX" alt=""><figcaption></figcaption></figure>

```markup
V 1.0.0
```

* Original Release

```
v 1.0.1
```

> Integrated LB-Phone into my promotion script. Added optional features with what you want to display whether its Ox\_Lib notification or notify your business through the phone itself on specific apps of your choice in the Config. There is additional features you can check on the docs. ./promote (msg) , will automatically promote your message to the chosen application & display on the phone. It will not be saved under your account as a tweet, but will be displayed.
>
> * You can enable/disable which apps would show the notification.

> Added configuration to where you want the notify to display.
>
> ```
> position?: 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'
> ```

{% embed url="<https://i.gyazo.com/c492c0621acbfdf974308dbd477c24b7.png>" fullWidth="false" %}

{% embed url="<https://i.gyazo.com/057c82334ac29c1228e467c43245c908.jpg>" fullWidth="false" %}

```
V 1.0.2
```

> Integrated Amber Alert for LB-PHONE

<figure><img src="/files/AXNn4SCWyFRZCo1PB4ci" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/B4fW5XXW7ZMme5yqtpyD" alt=""><figcaption></figcaption></figure>

```
V 1.0.3
```

> Integrated Chat message Config option to turn/disable. You can now enable wether you want the lib.notification on the right or a chat message top-left.

> Added editable fas-fa-icon Config Option.

<figure><img src="https://i.gyazo.com/74a63c58af5759b376abc5f4a63bfcf0.png" alt=""><figcaption></figcaption></figure>

```
V 1.0.6
```

> Optimized code (removed useless callbacks & unnecessary code). - best for medium-large servers.

> Fixed up events/exports for lb-phone (emergency \[amber-alert] & renamed applications to TOS-COMPLIANT names like Twitter -> Birdy & Instagram -> InstaPic

<mark style="color:$danger;">Changed Files:</mark>

* adminplus-promotion/ALL FILES

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

<figure><img src="/files/GICvWvhe7QLANSUPz86h" alt=""><figcaption></figcaption></figure>

* [<mark style="color:yellow;">Forums Post</mark>](https://forum.cfx.re/t/esx-business-advertisement-promote-your-job-city-wide-configurable-options/5125654)
* [<mark style="color:yellow;">Showcase (video)</mark>](https://youtu.be/dZgys_o97JY)
* [<mark style="color:yellow;">Tebex (purchase)</mark>](https://adminplus.tebex.io/package/5739940)
* [<mark style="color:yellow;">Support (discord)</mark>](https://discord.gg/J2mP9kJJ83)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adminplus.dev/paid-scripts/qb-esx-business-promotion-paid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
