[PAID] vsBasicConsole
[Explanation]
You want to easily control and administer your FiveM server via Discord?
The vsBasicConsole allows the people you select to execute commands in Discord which arrive on your FiveM server.
The commands can be protected by you.
You can find all commands below in the config.
[Showcase]
Link to the Showcase Video
[Buy it here]
TEBEX: vsBasicConsole
[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 vsBasicConsole, 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" -- Works only if Config.EnableEmbed = true
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.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 = "https://cdn.discordapp.com/attachments/973004306875809822/994391802138329088/VS.png" -- Beautify your embeds
Config.Image = "" -- Beautify your embeds
-- more security settings (added in 1.3.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)
-- 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 (Can be changed only in the Advanced version)
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}
},
['kick'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['kill'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['playerlist'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['revive'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['setjob'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['job'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['money'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['bank'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['blackmoney'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['addmoney'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['removemoney'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['removebank'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['addbank'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['removeblackmoney'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['addblackmoney'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['pm'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['heal'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['info'] = { -- command name (Can be changed only in the Advanced version)
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}
},
-- The command requires the script 'screenshot-basic' (https://github.com/citizenfx/screenshot-basic)
['screenshot'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['reviveall'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['inventory'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['teleport'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['car'] = { -- command name (Can be changed only in the Advanced version)
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}
},
['dv'] = { -- command name (Can be changed only in the Advanced version)
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}
}
}
[Editable Functions]
--[[
vsSendToDiscord is structured as follows:
First comes the title, then comes the message, then comes the color code of the embed
]]
if Config.Locale == 'en' then
function cmdPlayerCount() -- /playercounts
vsSendToDiscord("Player Count", "Current player count: " .. GetNumPlayerIndices(), 16711680)
end
function cmdKickPlayer(kick, playerName)
if kick then
vsSendToDiscord("Successfully Kicked", "Player was successfully kicked: " .. playerName, 16711680)
else
idNotFound()
end
end
function cmdKillPlayer(playerName)
vsSendToDiscord("Succesfully Killed", "Execution was carried out: " .. playerName, 16711680)
end
function cmdHealPlayer(playerName)
vsSendToDiscord("Succesfully Healed", "The cure was performed at: " .. playerName, 16711680)
end
function cmdPlayerList()
vsSendToDiscord("Player List", "There are 0 players on the server.", 16711680)
end
function cmdRevive(playerSource, playerName)
TriggerClientEvent("esx_ambulancejob:revive", playerSource)
vsSendToDiscord("Succesfully Revived", "The following player was revived: " .. playerName, 16711680)
end
function cmdSetJob(setJob, playerName)
if setJob then
vsSendToDiscord("Job changed", "Job changed for the following person: " .. playerName, 16711680)
else
vsSendToDiscord("Incorrect data", "You have entered the wrong job name or the wrong job grade. [/setjob ID JOB GRADE]", 16711680)
end
end
function cmdCheckJob(jobName, gradeLabel, grade)
vsSendToDiscord('Job informations', 'Job information:\n\nJob: '.. jobName ..' - '.. grade ..'\nJob Grade: '.. gradeLabel, 16711680)
end
function cmdMoney(money)
vsSendToDiscord("Cash", "The player currently has $".. money .." in his wallet.", 16711680)
end
function cmdBank(money)
vsSendToDiscord("Bank", "The player currently has $".. money .." in the bank.", 16711680)
end
function cmdBlackMoney(money)
vsSendToDiscord("Blackmoney", "The player currently has $".. money .." in black money on him.", 16711680)
end
function cmdAddMoney(addedMoney, playerName, oldMoney, newMoney)
if addedMoney then
vsSendToDiscord("Money Added", "The money was added (for: "..playerName.."). [Old account balance: "..oldMoney.." | New account balance: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Incorrect data", "The ID or the amount of money is incorrect. Use /addmoney ID MONEY", 16711680)
end
end
function cmdRemoveMoney(removedMoney, playerName, oldMoney, newMoney)
if removedMoney then
vsSendToDiscord("Money Removed", "The money was removed (from: "..playerName.."). [Old account balance: "..oldMoney.." | New account balance: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Incorrect data", "The ID or the amount of money is incorrect. Use /removemoney ID MONEY", 16711680)
end
end
function cmdAddBank(addedMoney, playerName, oldMoney, newMoney)
if addedMoney then
vsSendToDiscord("Bank Added", "The bank-money was added (for: "..playerName.."). [Old account balance: "..oldMoney.." | New account balance: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Incorrect data", "The ID or the amount of money is incorrect. Use /addbank ID MONEY", 16711680)
end
end
function cmdRemoveBank(removedMoney, playerName, oldMoney, newMoney)
if removedMoney then
vsSendToDiscord("Bank Removed", "The bank-money was removed (from: "..playerName.."). [Old account balance: "..oldMoney.." | New account balance: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Incorrect data", "The ID or the amount of money is incorrect. Use /removebank ID MONEY", 16711680)
end
end
function cmdAddBlackMoney(addedMoney, playerName, oldMoney, newMoney)
if addedMoney then
vsSendToDiscord("Blackmoney Added", "The Blackmoney was added (for: "..playerName.."). [Old account balance: "..oldMoney.." | New account balance: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Incorrect data", "The ID or the amount of money is incorrect. Use /addblackmoney ID MONEY", 16711680)
end
end
function cmdRemoveBlackMoney(removedMoney, playerName, oldMoney, newMoney)
if removedMoney then
vsSendToDiscord("Blackmoney Removed", "The Blackmoney was removed (from: "..playerName.."). [Old account balance: "..oldMoney.." | New account balance: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Incorrect data", "The ID or the amount of money is incorrect. Use /removeblackmoney ID MONEY", 16711680)
end
end
function cmdPM(transmitted, playerName, playerSource, message)
if transmitted then
TriggerClientEvent('vsDiscordConsole:sendMessage', playerSource, message)
vsSendToDiscord('Message transmitted', 'The message was sent to ' .. playerName .. ' has been transmitted.', 16711680)
else
vsSendToDiscord('No Message', 'You need to enter a message.', 16711680)
end
end
function cmdInfo(lists)
vsSendToDiscord('Informations', lists, 16711680)
end
function cmdReviveAll()
vsSendToDiscord('Revive all', 'All players were revived.', 16711680)
end
function cmdInventory(lists)
vsSendToDiscord('Inventory Informations', lists, 16711680)
end
function cmdTeleport(playerName)
vsSendToDiscord('Teleported', "The following player was teleported: "..playerName, 16711680)
end
function cmdScreenshot(playerName)
vsSendToDiscord('Create screenshot', "Screenshot of " .. playerName .. " is created:", 16711680)
end
function cmdCar()
vsSendToDiscord("Vehicle", "Player was put in the car.", 16711680)
end
function cmdDV()
vsSendToDiscord("Vehicle removed", "The car was successfully removed.", 16711680)
end
function commandProtect()
vsSendToDiscord("Command secured", "You have no rights to use the command.", 16711680)
end
function idNotFound()
vsSendToDiscord("Id not found", "Are you sure that you have entered the correct id / the player is online?", 16711680)
end
function wrongInput()
vsSendToDiscord("Incorrect input", "Did you make the correct entry?", 16711680)
end
function commandNotFound()
vsSendToDiscord("Discord Command", "Are you sure you entered the right command?", 16711680)
end
elseif Config.Locale == 'de' then
function cmdPlayerCount() -- /playercounts
vsSendToDiscord("Spieleranzahl", "Aktuelle Spielerzahl: " .. GetNumPlayerIndices(), 16711680)
end
function cmdKickPlayer(kick, playerName)
if kick then
vsSendToDiscord("Erfolgreich gekickt", "Folgender Spieler wurde gekickt: " .. playerName, 16711680)
else
idNotFound()
end
end
function cmdKillPlayer(playerName)
vsSendToDiscord("Erfolgreich gekillt", "Du hast folgenden Spieler getötet: " .. playerName, 16711680)
end
function cmdHealPlayer(playerName)
vsSendToDiscord("Erfolgreich geheilt", "Die Heilung wurde erfolgreich durchgeführt bei: " .. playerName, 16711680)
end
function cmdPlayerList()
vsSendToDiscord("Spielerliste", "Aktuell sind 0 Spieler online.", 16711680)
end
function cmdRevive(playerSource, playerName)
TriggerClientEvent("esx_ambulancejob:revive", playerSource)
vsSendToDiscord("Erfolgreich wiederbelebt", "Der folgende Spieler wurde wiederbelebt: " .. playerName, 16711680)
end
function cmdSetJob(setJob, playerName)
if setJob then
vsSendToDiscord("Job geändert", "Du hast den Job geändert für: " .. playerName, 16711680)
else
vsSendToDiscord("Falsche Eingabe", "Du hast denn Falschen Job oder denn Falschen Job Grade genutzt. [/setjob ID JOB GRADE]", 16711680)
end
end
function cmdCheckJob(jobName, gradeLabel, grade)
vsSendToDiscord('Job Informationen', 'Job Informationen:\n\nJob: '.. jobName ..' - '.. grade ..'\nJob Grade: '.. gradeLabel, 16711680)
end
function cmdMoney(money)
vsSendToDiscord("Cash", "Der Spieler hat $".. money .." Bar dabei.", 16711680)
end
function cmdBank(money)
vsSendToDiscord("Bank", "Der Spieler hat $".. money .." auf der Bank.", 16711680)
end
function cmdBlackMoney(money)
vsSendToDiscord("Blackmoney", "Der Spieler hat $".. money .." Schwarzgeld dabei.", 16711680)
end
function cmdAddMoney(addedMoney, playerName, oldMoney, newMoney)
if addedMoney then
vsSendToDiscord("Geld hinzugefügt", "Das Geld wurde hinzugefügt (für: "..playerName.."). [Alter Kontostand: "..oldMoney.." | Neuer Kontostand: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Falsche Daten", "Die ID oder die Geldmenge ist falsch. Benutze /addmoney ID GELDMENGE", 16711680)
end
end
function cmdRemoveMoney(removedMoney, playerName, oldMoney, newMoney)
if removedMoney then
vsSendToDiscord("Geld entfernt", "Das Geld wurde entfernt (von: "..playerName.."). [Alter Kontostand: "..oldMoney.." | Neuer Kontostand: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Falsche Daten", "Die ID oder die Geldmenge ist falsch. Benutze /removemoney ID GELDMENGE", 16711680)
end
end
function cmdAddBank(addedMoney, playerName, oldMoney, newMoney)
if addedMoney then
vsSendToDiscord("Bankgeld hinzugefügt", "Das Bankgeld wurde hinzugefügt (für: "..playerName.."). [Alter Kontostand: "..oldMoney.." | Neuer Kontostand: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Falsche Daten", "Die ID oder die Geldmenge ist falsch. Benutze /addbank ID GELDMENGE", 16711680)
end
end
function cmdRemoveBank(removedMoney, playerName, oldMoney, newMoney)
if removedMoney then
vsSendToDiscord("Bankgeld entfernt", "Das Bankgeld wurde entfernt (von: "..playerName.."). [Alter Kontostand: "..oldMoney.." | Neuer Kontostand: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Falsche Daten", "Die ID oder die Geldmenge ist falsch. Benutze /removebank ID GELDMENGE", 16711680)
end
end
function cmdAddBlackMoney(addedMoney, playerName, oldMoney, newMoney)
if addedMoney then
vsSendToDiscord("Schwarzgeld hinzugefügt", "Das Schwarzgeld wurde hinzugefügt (für: "..playerName.."). [Alter Kontostand: "..oldMoney.." | Neuer Kontostand: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Falsche Daten", "Die ID oder die Geldmenge ist falsch. Benutze /addblackmoney ID GELDMENGE", 16711680)
end
end
function cmdRemoveBlackMoney(removedMoney, playerName, oldMoney, newMoney)
if removedMoney then
vsSendToDiscord("Schwarzgeld entfernt", "Das Schwarzgeld wurde entfernt (von: "..playerName.."). [Alter Kontostand: "..oldMoney.." | Neuer Kontostand: "..newMoney.."]", 16711680)
else
vsSendToDiscord("Falsche Daten", "Die ID oder der Geldbetrag ist falsch. Verwenden Sie /removeblackmoney ID GELD", 16711680)
end
end
function cmdPM(transmitted, playerName, playerSource, message)
if transmitted then
TriggerClientEvent('vsDiscordConsole:sendMessage', playerSource, message)
vsSendToDiscord('Nachricht übertragen', 'Die Nachricht wurde an ' .. playerName .. ' übertragen.', 16711680)
else
vsSendToDiscord('Keine Nachricht', 'Sie müssen eine Nachricht eingeben.', 16711680)
end
end
function cmdInfo(lists)
vsSendToDiscord('Informationen', lists, 16711680)
end
function cmdReviveAll()
vsSendToDiscord('Alle wiederbelebt', 'Alle Spieler wurden wiederbelebt.', 16711680)
end
function cmdInventory(lists)
vsSendToDiscord('Inventar Informationen', lists, 16711680)
end
function cmdTeleport(playerName)
vsSendToDiscord('Teleportiert', "Der folgende Spieler wurde teleportiert: "..playerName, 16711680)
end
function cmdScreenshot(playerName)
vsSendToDiscord('Screenshot erstellt', "Screenshot von " .. playerName .. " wurde erstellt:", 16711680)
end
function cmdCar()
vsSendToDiscord("Auto", "Der Spieler wurde ins Auto gesetzt.", 16711680)
end
function cmdDV()
vsSendToDiscord("Auto entfernt", "Das Auto wurde erfolgreich entfernt.", 16711680)
end
function commandProtect()
vsSendToDiscord("Befehl gesichert", "Sie haben keine Berechtigung, diesen Befehl zu verwenden.", 16711680)
end
function idNotFound()
vsSendToDiscord("ID nicht gefunden", "Sind Sie sicher, dass Sie die richtige ID eingegeben haben / der Spieler ist online?", 16711680)
end
function wrongInput()
vsSendToDiscord("Falsche Eingabe", "Haben Sie die richtige Eingabe gemacht?", 16711680)
end
function commandNotFound()
vsSendToDiscord("Discord Befehl", "Sind Sie sicher, dass Sie den richtigen Befehl eingegeben haben?", 16711680)
end
end
[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 |