⏸
mPausemenu
mPausemenu Documentation
Unzip the script folder than copy or cut everything inside file and paste it on your server resources folder. ( NOTE : If you are using Filezilla and getting error like the linked image please use "WINSCP".
Add the script to you server config : " ensure cm-pausemenu ". ( NOTE : Please don't change the script name or folder name.)
When you open the config file you'll see a lines of codes to configure it to your server.

// Config.Framework = "autodetect" -- newqb, oldqb, esx or autodetect
Select framework you're using options are esx, newqb, oldqb or autodetect.
( NOTE : If you don't know which version qb your server is, check your scripts' files, if you see something like this in your scripts, choose oldqb )
// TriggerEvent('QBCore:GetObject', function(obj) QBCore = obj end) -- OLD QB
if you see this you can choose newqb
exports["qb-core"]:GetCoreObject() ). -- NEW QB
// Config.Mysql = "oxmysql" -- mysql-async, ghmattimysql, oxmysql
Choose your server sql.

For Discord photos, you need to enter a bot token here. Bot Token Video : https://www.youtube.com/watch?v=-m-Z7Wav-fM&ab_channel=GAKventure
You can change the patch notes from here.

From Config File...
When you launch codem-pausemenu on your server, battlepass will be activated and this option determines how many days battlepass should be active before resetting everybody's battlepass data

This option makes battlepass free for everyone.

If this set to true you don't have to make tebex integration
How to connect tebex to your server
1-)First click on Game Servers button on navbar and then click on "CONNECT YOUR FIRST GAME SERVER" button.


2-) Select plugin here and click Continue

3-) Enter name of your server then click Continue again

4-) Click copy command and paste it to server.cfg then restart your server and when Not Connected indicator turns green and says connected click continue

5-) Click Packages button on navbar and create a new package on that page by clicking Add New button


6-) Type description and name of the package

7-) Click game server commands button here

8-) Set your settings according to this and paste this to command input
battlepass {transaction}

9-) Click settings icon and this will open

10-) Set the options like in the screenshot and click on Create

11-) When someone is purchased battlepass package he can claim the battlepass with tbx-id


The day counter starts from the day the script was started on your server. Each item represents one day in Config.DailyAwardsItem for example players who connected while the day counter is still one can claim the first item in the Config.DailyAwardsItem. Every 24 hours the day counter increments by one and resets itself to day 1 when the day counter equals the maximum amount of items in Config.DailyAwardsItem.
You can change the pausemenu theme from here.


Purple

Red

Green

Blue

White
Add link of your store or anything you want

If this is set to true the pausemenu will reopen after player close map, settings or keybinds page

If this is set to true prevents players from constantly opening and closing the menu

This option determines how many times players can spam to open menu before the cooldown is activated

If this option set to true the script will use the RegisterKeyMapping system or false will use the traditional system Note : If Config.UseRegisterKeyMappingSystem is set to true, even if you change the Config.MenuOpenKey value after logging into the server it will still be the same in-game. You can do a few things to fix this.
1- Change the script name This will reset the key for everyone and new key you've written in Config.MenuOpenKey will be apply to everyone.
2- Change the key from settings/keybinds/fivem This will be only apply to you and other players also need to change from settings.
3- Set Config.UseRegisterKeyMappingSystem to false This is not the recommend way because script may consume more resmon value.

If you set Config.UseRegisterKeyMappingSystem true you can reference here if you want to change Config.MenuOpenKey.
https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
If false you can reference here to change Config.MenuOpenKey. https://docs.fivem.net/docs/game-references/controls/

Players will not able to write words in this table to the chat.

Missions in codem-pausemenu's battlepass system are created from the Config.BattlepassMissions pool, and this option determines how many missions the system should get from the pool per day Note : for example if this option is set to 6 and amount of missions in the pool is less than 6 then the script will generate a random number between 1 and maximum missions amount

How to change mission title?
- in this example you can change where "Eat" is written
How to change mission description?
- Change where "Eat any 5 food" is written
How can I make missions take longer or shorter?
- You need to change repeatAmount value in this example if you type there 8 then players have to eat something 8 times instead of 5 and ui will update according to this
How to change given xp amount when a player is completed mission?
- You need to change the value of xpAmount

Adding custom missions (This requires lua knowledge we don't provide support about adding custom missions) Let's say you want to add a bank robbing mission and accordingly you first need to copy an existing mission and paste it into the Config.BattlepassMissions table in this example I'll copy and paste the mission with the id 6
1-) Add an unique id to new mission (must be a number)
2-) Change the label and description according to mission you want add
3-) Change repeatAmount value to specify how many times players must repeat the mission to complete it
4-) Change the xpAmount to determine how much xp should be given to players when the mission is complete
5-) You can code your own logic in func option (example is provided in the screenshot below)


Adding items and levels Each item represents a level, let's say you have 20 registered items in this option and this makes the maximum level 20.
You can copy and paste the example down below in the Config.BattlepassItem then edit options according to your liking.
Weapon example
{
name = 'weapon_pistol',
label = 'Pistol',
image = 'advancedkit.png', -- image of the item you can add more images in cm-pausemenu\html\assets\item_images
amount = 1,
type = 'weapon',
requiredXP = 1000, -- This is required to determine how much xp required for next level
level = 4, -- players with battlepass level 4 or higher can claim this item (make sure level is unique for each item and keep the order for example if you adding this item after level 5 then make this value 6)
premium = false, -- if true only players who payed for the batttlepass can claim this item if false everyone who has enough level can claim
},
Item example
{
name = 'water',
label = 'Water',
image = 'water.png', -- image of the item you can add more images in cm-pausemenu\html\assets\item_images
amount = 2,
type = 'item',
requiredXP = 1500, -- This is required to determine how much xp required for next level
level = 2, -- players with battlepass level 2 or higher can claim this item (make sure level is unique for each item and keep the order for example if you adding this item after level 5 then make this value 6)
premium = true, -- if true only players who payed for the batttlepass can claim this item if false everyone who has enough level can claim
},
Cash example
{
amount = 5000,
label = 'Cash',
image = 'cash.png', -- image of the item you can add more images in cm-pausemenu\html\assets\item_images
type = 'money',
requiredXP = 1000, -- This is required to determine how much xp required for next level
level = 1, -- players with battlepass level 1 or higher can claim this item (make sure level is unique for each item and keep the order for example if you adding this item after level 5 then make this value 6)
premium = false, -- if true only players who payed for the batttlepass can claim this item if false everyone who has enough level can claim
},
Vehicle example
{
name = 'adder', -- Spawn name of the vehicle
label = 'Adder',
image = 'Adder.png', -- check html/assets/car_images for more car images
type = 'vehicle',
requiredXP = 5000, -- This is required to determine how much xp required for next level
level = 5, -- players with battlepass level 5 or higher can claim this item (make sure level is unique for each item and keep the order for example if you adding this item after level 5 then make this value 6)
premium = false, -- if true only players who payed for the batttlepass can claim this item if false everyone who has enough level can claim
},
Adding multiple items
{
label = 'Items Box',
image = 'box.png',
type = 'box',
requiredXP = 5000, -- This is required to determine how much xp required for next level
level = 6, -- players with battlepass level 5 or higher can claim this item (make sure level is unique for each item and keep the order for example if you adding this item after level 5 then make this value 6)
items = {
{
name = 'adder',
label = 'Adder',
type = 'vehicle',
},
{
name = 'phone',
label = 'Phone',
amount = 1,
type = 'item',
},
{
name = 'water',
label = 'Water',
amount = 2,
type = 'item',
},
{
amount = 5000,
label = 'Cash',
type = 'money',
},
},
premium = true, -- if true only players who payed for the batttlepass can claim this item if false everyone who has enough level can claim
},
Adding new items for daily awards
The day counter starts from the day the script was started on your server. Each item represents one day in Config.DailyAwardsItem for example players who connected while the day counter is still one can claim the first item in the Config.DailyAwardsItem. Every 24 hours the day counter increments by one and resets itself to day 1 when the day counter equals the maximum amount of items in Config.DailyAwardsItem.
To add new item you can copy and paste the example down below in the Config.DailyAwardsItem then edit options according to your liking
Use here to integrate your own notify system.
Weapon example
{
name = 'weapon_pistol',
label = 'Pistol',
image = 'advancedkit.png', -- image of the item you can add more images in cm-pausemenu\html\assets\item_images
amount = 1,
type = 'weapon',
},
Item example
{
name = 'water',
label = 'Water',
image = 'water.png', -- image of the item you can add more images in cm-pausemenu\html\assets\item_images
amount = 2,
type = 'item',
},
Cash example
{
amount = 5000,
label = 'Cash',
image = 'cash.png', -- image of the item you can add more images in cm-pausemenu\html\assets\item_images
type = 'money',
},
Vehicle example
{
name = 'adder', -- Spawn name of the vehicle
label = 'Adder',
image = 'Adder.png', -- check html/assets/car_images for more car images
type = 'vehicle',
},
Adding multiple items
{
label = 'Items Box',
image = 'box.png',
type = 'box',
items = {
{
name = 'adder',
label = 'Adder',
type = 'vehicle',
},
{
name = 'phone',
label = 'Phone',
amount = 1,
type = 'item',
},
{
name = 'water',
label = 'Water',
amount = 2,
type = 'item',
},
{
amount = 5000,
label = 'Cash',
type = 'money',
},
},
},
Commands
/addbattlepassxp playerId xpAmount (Adds player battlepass xp)
/removebattlepassxp playerId xpAmount (Removes player battlepass xp)
/setbattlepassxp playerId xpAmount (Sets player battlepass xp)
/addbattlepasslevel playerId (Adds player battlepass level)
/removebattlepasslevel playerId (Removes player battlepass level)
/setbattlepasslevel playerId level (Sets battlepass level)
/givebattlepass playerId (gives battlepass right)
/removebattlepass playerId (removes battlepass right)

Last modified 7mo ago
