-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): Standarize Config files
- Loading branch information
Showing
22 changed files
with
309 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
local MaxPlayers = GlobalState.MaxPlayers | ||
local Discord = require 'config.client'.Discord | ||
|
||
AddStateBagChangeHandler('PlayerCount', nil, function(bagName, _, value) | ||
if bagName ~= 'global' or not value then return end | ||
local players = 'Players %s/' .. Config.MaxPlayers | ||
SetRichPresence((players):format(value)) | ||
if bagName == 'global' and value then | ||
local players = 'Players %s/' .. MaxPlayers | ||
SetRichPresence((players):format(value)) | ||
end | ||
end) | ||
|
||
SetDiscordAppId(Config.Discord.AppId) | ||
SetDiscordRichPresenceAsset(Config.Discord.LargeIcon.icon) | ||
SetDiscordRichPresenceAssetText(Config.Discord.LargeIcon.text) | ||
SetDiscordRichPresenceAssetSmall(Config.Discord.SmallIcon.icon) | ||
SetDiscordRichPresenceAssetSmallText(Config.Discord.SmallIcon.text) | ||
SetDiscordRichPresenceAction(0, Config.Discord.FirstButton.text, Config.Discord.FirstButton.link) | ||
SetDiscordRichPresenceAction(1, Config.Discord.SecondButton.text, Config.Discord.SecondButton.link) | ||
SetDiscordAppId(Discord.AppId) | ||
SetDiscordRichPresenceAsset(Discord.LargeIcon.icon) | ||
SetDiscordRichPresenceAssetText(Discord.LargeIcon.text) | ||
SetDiscordRichPresenceAssetSmall(Discord.SmallIcon.icon) | ||
SetDiscordRichPresenceAssetSmallText(Discord.SmallIcon.text) | ||
SetDiscordRichPresenceAction(0, Discord.FirstButton.text, Discord.FirstButton.link) | ||
SetDiscordRichPresenceAction(1, Discord.SecondButton.text, Discord.SecondButton.link) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
return { | ||
StatusInterval = 5, -- how often to check hunger/thirst status in minutes | ||
LoadingModelsTimeout = 10000, -- Waiting time for ox_lib to load the models before throws an error, for low specs pc | ||
|
||
PauseMapText = 'Powered by Qbox', -- Text shown above the map when ESC is pressed. If left empty 'FiveM' will appear | ||
|
||
Characters = { | ||
UseExternalCharacters = false, -- Whether you have an external character management resource. (If true, disables the character management inside the core) | ||
EnableDeleteButton = true, -- Whether players should be able to delete characters themselves. | ||
StartingApartment = true, -- If set to false, skips apartment choice in the beginning (requires qbx_spawn if true) | ||
|
||
ProfanityWords = { | ||
['bad word'] = true | ||
}, | ||
|
||
Locations = { -- Spawn locations for multichar, these are chosen randomly | ||
{ | ||
pedCoords = vec4(969.25, 72.61, 116.18, 276.55), | ||
camCoords = vec4(972.2, 72.9, 116.68, 97.27), | ||
}, | ||
{ | ||
pedCoords = vec4(1104.49, 195.9, -49.44, 44.22), | ||
camCoords = vec4(1102.29, 198.14, -48.86, 225.07), | ||
}, | ||
{ | ||
pedCoords = vec4(-2163.87, 1134.51, -24.37, 310.05), | ||
camCoords = vec4(-2161.7, 1136.4, -23.77, 131.52), | ||
}, | ||
{ | ||
pedCoords = vec4(-996.71, -68.07, -99.0, 57.61), | ||
camCoords = vec4(-999.90, -66.30, -98.45, 241.68), | ||
}, | ||
{ | ||
pedCoords = vec4(-1023.45, -418.42, 67.66, 205.69), | ||
camCoords = vec4(-1021.8, -421.7, 68.14, 27.11), | ||
}, | ||
{ | ||
pedCoords = vec4(2265.27, 2925.02, -84.8, 267.77), | ||
camCoords = vec4(2268.24, 2925.02, -84.36, 90.88), | ||
} | ||
}, | ||
|
||
}, | ||
|
||
Discord = { | ||
AppId = '', -- This is the Application ID (Replace this with you own) | ||
|
||
LargeIcon = { -- To set this up, visit https://forum.cfx.re/t/how-to-updated-discord-rich-presence-custom-image/157686 | ||
icon = 'logo_name', -- Here you will have to put the image name for the 'large' icon. | ||
text = 'This is a large icon with text', -- Here you can add hover text for the 'large' icon. | ||
}, | ||
|
||
SmallIcon = { | ||
icon = 'logo_name', -- Here you will have to put the image name for the 'small' icon. | ||
text = 'This is a small icon with text', -- Here you can add hover text for the 'small' icon. | ||
}, | ||
|
||
FirstButton = { | ||
text = 'First Button!', | ||
link = 'fivem://connect/localhost:30120', | ||
}, | ||
|
||
SecondButton = { | ||
text = 'Second Button!', | ||
link = 'fivem://connect/localhost:30120', | ||
} | ||
} | ||
} |
Oops, something went wrong.