[PAID] vsAdvancedConsole
[Explanation]
You want to easily control and administer your FiveM server via Discord?
The vsAdvancedConsole offers you the possibility to do just that. With over 20 pre-registered commands, you can add an infinite number of others.
The code of the commands is accessible to you here.
Of course, these can also be tailored to your server.
[Showcase]
Link to the Showcase Video
[Buy it here]
TEBEX: vsAdvancedConsole
[Advantages of the Advanced version]
- Access to the source code of the commands (VS excluded)
- Infinite number of commands can be added
- Integration for vsTrollprotect
- Integration for vsRefundSystem and a new command
- Name of the bot adjustable
- Bot avatar adjustable
- Bot completely configurable
- Rename commands
- Discord roles are protectable
[Description]
To facilitate support on your server, team members often need to be able to call up information and carry out instructions.
Of course, not everyone should be able to access your server console or have ingame rights.
With the vsAdvancedConsole, your team members can execute the commands listed below via a Discord channel.
At the same time, you have a log of which command was executed when through reply messages from our bot.
For the /screenshot Command, you need to have Screenshot-Basic!
[Config]
Config = {}
Config.Version = true -- select your esx version (true = old esx version)
Config.Locale = 'en' -- your language
-- Bot-Settings
Config.BotName = "VibeScripts" -- change the bot name
Config.GuildId = "" -- This is the id of your Discord (right click on the top of your Discord name and then go to "copy server id".
Config.ChannelID = "" -- channel id from discord via which you can use the bot
Config.ConnectMessage = true -- Message when the bot is successfully connected
Config.Avatar = "" -- profile picture
Config.Prefix = "/" -- with which character you can execute the command
Config.WaitForMessage = 4000 -- time in milliseconds until the last message is scanned
-- Webhook-Settings
Config.Webhook = " " -- webhook link
Config.EnableEmbed = false -- true = with title / false = without title (watch the Youtube video or test the difference yourself)
Config.WebhookId = "" -- Important to ensure additional security
Config.EnableWarnMessage = true -- Warning message if no WebhookId was specified
Config.Thumbnail = " " -- Beautify your embeds
Config.Image = "" -- Beautify your embeds
Config.Footer = 'vsAdvancedConsole V 1.0.0 - '
-- more security settings (added in 2.1.0)
Config.EnableTeamRole = true -- enable general team roles
Config.TeamRole = {'roleid1', 'roleid2'} -- add team roles, these are needed to use any command at all (the command protections still work of course)
-- new role protection (added in 2.0.0)
Config.RoleProtection = { -- the role protection only works if the command is set to protect = true
['playercount'] = {'roleId1', 'roleId2', 'roleId3'}
}
-- Command-Settings
Config.GloabalProtect = false -- All protected commands are protected only with the Ids enumerated below (time saving if they are always the same Ids)
Config.GloabalProtectIds = { -- discord ids for the protected commands
872155114645913670}
Config.Commands = {
['playercount'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
EditableFunctions.PlayerCount()
end
},
['kick'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
EditableFunctions.KickPlayer(true, GetPlayerName(player[2]))
DropPlayer(player[2], _U('kickPlayer'))
else
EditableFunctions.KickPlayer(false, "")
end
end
},
['kill'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
TriggerClientEvent("vsDiscordConsole:kill", player[2])
EditableFunctions.KillPlayer(GetPlayerName(player[2]))
else
EditableFunctions.PlayerNotFound()
end
end
},
['playerlist'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local count = 0
local xPlayers = ESX.GetPlayers()
local t = {}
for i = 1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
count = count + 1
t[#t + 1] = '**Player #' .. count .. '**\n**txAdmin Name:** ' .. GetPlayerName(xPlayers[i]) ..
"\n**Ingame Name:** " .. xPlayer.getName() .. "\n**ID:** " .. xPlayers[i] ..
"\n**His Job:** " .. xPlayer.getJob().name
end
local players = table.concat(t, "\n\n")
if count == 0 then
EditableFunctions.PlayerList()
else
vsSendToDiscord(_U('playerList'), players, 16711680)
end
end
},
['revive'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
EditableFunctions.Revive(player[2], GetPlayerName(player[2]))
else
EditableFunctions.PlayerNotFound()
end
end
},
['setjob'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] and player[4] then
xPlayer.setJob(tostring(player[3]), player[4])
EditableFunctions.SetJob(true, xPlayer.getName())
else
EditableFunctions.SetJob(false, "")
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['job'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
local job = xPlayer.getJob()
EditableFunctions.CheckJob(job.name, job.grade_label, job.grade)
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['money'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
local money = xPlayer.getMoney()
if money then
EditableFunctions.Money(money)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['bank'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
local money = xPlayer.getAccount('bank').money
if money then
EditableFunctions.Bank(money)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['blackmoney'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
local money = xPlayer.getAccount('black_money').money
if money then
EditableFunctions.BlackMoney(money)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['addmoney'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] then
local money = xPlayer.getMoney()
xPlayer.addMoney(tonumber(player[3]))
EditableFunctions.AddMoney(true, xPlayer.getName(), money, money + player[3])
else
EditableFunctions.AddMoney(false, "", 0, 0)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['removemoney'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] then
local money = xPlayer.getMoney()
xPlayer.removeMoney(tonumber(player[3]))
EditableFunctions.RemoveMoney(true, xPlayer.getName(), money, money - player[3])
else
EditableFunctions.RemoveMoney(false, "", 0, 0)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['removebank'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] then
local money = xPlayer.getAccount('bank').money
xPlayer.removeAccountMoney('bank', tonumber(player[3]))
EditableFunctions.RemoveBank(true, xPlayer.getName(), money, money - player[3])
else
EditableFunctions.RemoveBank(false, "", 0, 0)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['addbank'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] then
local money = xPlayer.getAccount('bank').money
xPlayer.addAccountMoney('bank', tonumber(player[3]))
EditableFunctions.AddBank(true, xPlayer.getName(), money, money + player[3])
else
EditableFunctions.AddBank(false, "", 0, 0)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['removeblackmoney'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] then
local money = xPlayer.getAccount('black_money').money
xPlayer.removeAccountMoney('black_money', tonumber(player[3]))
EditableFunctions.RemoveBlackMoney(true, xPlayer.getName(), money, money - player[3])
else
EditableFunctions.RemoveBlackMoney(false, "", 0, 0)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['addblackmoney'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
local xPlayer = ESX.GetPlayerFromId(player[2])
if xPlayer then
if player[3] then
local money = xPlayer.getAccount('black_money').money
xPlayer.addAccountMoney('black_money', tonumber(player[3]))
EditableFunctions.AddBlackMoney(true, xPlayer.getName(), money, money + player[3])
else
EditableFunctions.AddBlackMoney(false, "", 0, 0)
end
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['pm'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args ~= nil and args[2] ~= nil then
if GetPlayerName(args[2]) ~= nil then
if args[3] then
local pmMessage = ''
for i, v in pairs(args) do
if i == 1 or i == 2 then
else
pmMessage = pmMessage .. ' ' .. v
end
end
if pmMessage and pmMessage ~= '' then
EditableFunctions.PM(true, GetPlayerName(args[2]), args[2], pmMessage)
else
EditableFunctions.PM(false, "", 0, "")
end
else
EditableFunctions.PM(false, "", 0, "")
end
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['heal'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local player = ExtractCommand(command, " ")
if player[2] ~= nil and GetPlayerName(player[2]) ~= nil then
TriggerClientEvent("vsDiscordConsole:heal", player[2])
EditableFunctions.HealPlayer(GetPlayerName(player[2]))
else
EditableFunctions.PlayerNotFound()
end
end
},
['info'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args[2] then
if GetPlayerName(tonumber(args[2])) then
local identifierlist = ExtractIdentifiers(args[2])
local data = {
playerid = args[2],
identifier = identifierlist.license:gsub("license2:", ""),
steam = identifierlist.steam:gsub('steam:', ''),
discord = "<@" .. identifierlist.discord:gsub("discord:", "") .. ">"
}
local identifiers = 'Player information: \n\n**ID:** ' .. data.playerid .. '\n**Identifier:** ' ..
data.identifier .. '\n**Steam:** steam:' .. data.steam .. '\n**Discord:** ' ..
data.discord
EditableFunctions.Info(identifiers)
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
},
-- The command requires the script 'screenshot-basic' (https://github.com/citizenfx/screenshot-basic)
['screenshot'] = { -- command name (name can be changed arbitrarily)
enable = false, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args[2] then
if GetPlayerName(tonumber(args[2])) then
TriggerClientEvent('vsDiscordConsole:screenshot', args[2])
EditableFunctions.Screenshot(GetPlayerName(args[2]))
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['reviveall'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
for _, playerId in ipairs(GetPlayers()) do
TriggerClientEvent('esx_ambulancejob:revive', playerId)
end
EditableFunctions.ReviveAll()
end
},
['inventory'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args[2] then
if GetPlayerName(tonumber(args[2])) then
local inventory = 'Inventory information:\n\n'
local xPlayer = ESX.GetPlayerFromId(tonumber(args[2]))
if xPlayer and xPlayer.getInventory() then
for i, v in pairs(xPlayer.getInventory()) do
if v.count > 0 then
inventory = inventory .. "ItemName: " .. v.label .. " - Quantity: " .. v.count .. '\n'
end
end
EditableFunctions.Inventory(inventory)
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['teleport'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args[2] then
if GetPlayerName(args[2]) then
local heading
if args[6] then
if tonumber(args[6]) then
heading = args[6]
else
heading = 100.0
end
else
heading = 100.0
end
if args[3] and args[4] and args[5] then
if tonumber(args[3]) and tonumber(args[4]) and tonumber(args[5]) then
TriggerClientEvent('vsDiscordConsole:teleport', args[2], args[3], args[4], args[5], heading)
EditableFunctions.Teleport(GetPlayerName(args[2]))
else
EditableFunctions.WrongInput()
end
else
EditableFunctions.WrongInput()
end
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['car'] = { -- command name (name can be changed arbitrarily)
enable = false, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args[2] and args[3] then
if GetPlayerName(tonumber(args[2])) then
TriggerClientEvent('vsDiscordConsole:car', args[2], args[3])
EditableFunctions.Car()
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
},
['dv'] = { -- command name (name can be changed arbitrarily)
enable = false, -- Should the command be activated?
protect = true, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
local args = ExtractCommand(command, " ")
if args[2] then
if GetPlayerName(tonumber(args[2])) then
TriggerClientEvent('vsDiscordConsole:dv', args[2])
EditableFunctions.DV()
else
EditableFunctions.PlayerNotFound()
end
else
EditableFunctions.PlayerNotFound()
end
end
}
--[[ Example of a new command
['yourCommandName'] = { -- command name (name can be changed arbitrarily)
enable = true, -- Should the command be activated?
protect = false, -- Should the command only be executed by certain persons?
protectIds = { -- Discord Ids of the persons who can execute the command (protect = true)
872155114645913670},
cmdExecute = function(command, id)
Here you can run the code that should happen as soon as the command is used
end
}
]]
}
[Editable Functions]
Due to the character limit of a post, we could not insert them here. Feel free to look them up in the vsBasicConsole post.
[Optimization]
Idle: 0.00-0.00ms
Work: 0.00-0.00ms
[FiveM Asset Escrow System]
This script is using the Asset Escrow system.
Click here to know more about it.
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 1200 |
Requirements | ESX |
Support | Yes |