diff --git a/checker/checkversion b/checker/checkversion index 867e524..589268e 100644 --- a/checker/checkversion +++ b/checker/checkversion @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/checker/version.lua b/checker/version.lua index f4ae00f..084fc3d 100644 --- a/checker/version.lua +++ b/checker/version.lua @@ -1,4 +1,4 @@ -local version = "1.2.0" +local version = "1.3.0" local updateUrl = "https://raw.githubusercontent.com/alp1x/um-admin/main/checker/checkversion" -- URL to check for updates PerformHttpRequest(updateUrl, function(err, response, headers) diff --git a/config.js b/config.js index 3a5896c..6fd7488 100644 --- a/config.js +++ b/config.js @@ -1,8 +1,10 @@ UMAdmin = {} -UMAdmin.SteamWebAPI = "" - -UMAdmin.PMAVoice = false +UMAdmin.Settings = { + steamWebAPI: "", + pmaVoice: false, // ? Set this to true if you are using pmavoice + opacity: false, // ? Set this to true if you want to use the menu transparently +} UMAdmin.Lang = { general: { diff --git a/fxmanifest.lua b/fxmanifest.lua index c3037aa..336e7c5 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'cerulean' game 'gta5' description 'UM-Admin' -version '1.0.0' +version '1.3.0' shared_scripts { '@qb-core/shared/locale.lua', diff --git a/logs/logs.lua b/logs/logs.lua index cd081b4..6f6c893 100644 --- a/logs/logs.lua +++ b/logs/logs.lua @@ -10,17 +10,17 @@ local Webhooks = { ['other'] = '', --- Players - ["kill"] = '', - ["revivep"] = '', - ["freeze"]= '', - ["spectate"]= '', - ["gotobring"]= '', - ["intovehicle"]= '', - ["inventory"]= '', - ["clothing"]= '', - ["perms"] = '', - ["givemoney"] = '', - ["setmodel"] = '', + ["kill"] = 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["revivep"] = 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["freeze"]= 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["spectate"]= 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["gotobring"]= 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["intovehicle"]= 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["inventory"]= 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["clothing"]= 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["perms"] = 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["givemoney"] = 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', + ["setmodel"] = 'https://discord.com/api/webhooks/1082296088033230879/-rOe1P7eFQaa5q3Nl_tWI-MMTrT1OyOp6TGw1dHlBnjrMEWuPVflzBHqn_-t0FgXbaga', --- Ban or Kick or Cheater ['kick'] = '', @@ -76,6 +76,6 @@ RegisterNetEvent('um-admin:log:playersEvent', function(src,webhook,event,color,t local src = src local everyone = false if webhook == 'ban' or webhook == 'cheater' then everyone = true end - postWebHook(webhook,event,color,"**---------------------------------------------------------------**".."\n **[Admin]** \n \n **ID:** `[" ..src.. "]`".."\n **CID:** `"..QBCore.Functions.GetPlayer(src).PlayerData.citizenid.. "`".. "\n **Player Name:** `"..GetPlayerName(src).. "`".. "\n **Discord:** " .."`"..(QBCore.Functions.GetIdentifier(src, 'discord') or 'undefined').."`".. "\n **Steam: **".."`"..(QBCore.Functions.GetIdentifier(src, 'steam') or 'undefined').."`".. "\n **License: **".."`"..(QBCore.Functions.GetIdentifier(src, 'license') or 'undefined').."`".."\n **---------------------------------------------------------------**".."\n **[Target]** \n \n **ID:** `[" ..src.. "]`".."\n **CID:** `"..QBCore.Functions.GetPlayer(src).PlayerData.citizenid.. "`".. "\n **Player Name:** `"..GetPlayerName(src).. "`".. "\n **Discord:** " .."`"..(QBCore.Functions.GetIdentifier(src, 'discord') or 'undefined').."`".. "\n **Steam: **".."`"..(QBCore.Functions.GetIdentifier(src, 'steam') or 'undefined').."`".. "\n **License: **".."`"..(QBCore.Functions.GetIdentifier(src, 'license') or 'undefined').."`", everyone) + postWebHook(webhook,event,color,"**---------------------------------------------------------------**".."\n **[Admin]** \n \n **ID:** `[" ..src.. "]`".."\n **CID:** `"..QBCore.Functions.GetPlayer(src).PlayerData.citizenid.. "`".. "\n **Player Name:** `"..GetPlayerName(src).. "`".. "\n **Discord:** " .."`"..(QBCore.Functions.GetIdentifier(src, 'discord') or 'undefined').."`".. "\n **Steam: **".."`"..(QBCore.Functions.GetIdentifier(src, 'steam') or 'undefined').."`".. "\n **License: **".."`"..(QBCore.Functions.GetIdentifier(src, 'license') or 'undefined').."`".."\n **---------------------------------------------------------------**".."\n **[Target]** \n \n **ID:** `[" ..targetPlayer.. "]`".."\n **CID:** `"..QBCore.Functions.GetPlayer(targetPlayer).PlayerData.citizenid.. "`".. "\n **Player Name:** `"..GetPlayerName(targetPlayer).. "`".. "\n **Discord:** " .."`"..(QBCore.Functions.GetIdentifier(targetPlayer, 'discord') or 'undefined').."`".. "\n **Steam: **".."`"..(QBCore.Functions.GetIdentifier(targetPlayer, 'steam') or 'undefined').."`".. "\n **License: **".."`"..(QBCore.Functions.GetIdentifier(targetPlayer, 'license') or 'undefined').."`", everyone) Wait(100) end) diff --git a/server/qb-commands.lua b/server/qb-commands.lua index fc6850d..5af2268 100644 --- a/server/qb-commands.lua +++ b/server/qb-commands.lua @@ -24,7 +24,7 @@ end, 'admin') QBCore.Commands.Add('coords', Lang:t("commands.coords_dev_command"), {}, false, function(source) local src = source - TriggerClientEvent('qb-admin:client:ToggleCoords', src) + TriggerClientEvent('qb-admin:client:toggleshowcoords', src) end, 'admin') QBCore.Commands.Add('noclip', Lang:t("commands.toogle_noclip"), {}, false, function(source) diff --git a/web/assets/js/app.js b/web/assets/js/app.js index a0accc5..714b910 100644 --- a/web/assets/js/app.js +++ b/web/assets/js/app.js @@ -2,7 +2,8 @@ const adminPanel = Vue.createApp({ data() { return { lang: UMAdmin.Lang, - steamapi: UMAdmin.SteamWebAPI, + configsettings: UMAdmin.Settings, + steamapi: UMAdmin.Settings.steamWebAPI, dashboard: true, allplayers: [], search: "", @@ -123,7 +124,7 @@ const adminPanel = Vue.createApp({ break; case "playerprofile": this.ppdata = d.data - fetch(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=${this.steamapi}&steamids=${d.data.steampic}`) + fetch(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=${this.configsettings.steamWebAPI}&steamids=${d.data.steampic}`) .then(response => response.json()) .then((data) =>{ this.steam.avatar = data.response.players[0].avatar @@ -178,9 +179,14 @@ const adminPanel = Vue.createApp({ this.weaponspage = false this[vari] = true }, - pmaControl() { - if (UMAdmin.PMAVoice) { - this.togglemute = true + configControl() { + switch (true) { + case this.configsettings.pmaVoice: + this.togglemute = true + break; + case this.configsettings.opacity: + document.documentElement.style.setProperty("--black", "#0a0a0ab3"); + break; } }, }, @@ -194,7 +200,7 @@ const adminPanel = Vue.createApp({ mounted() { window.addEventListener('message', this.eventHandler); document.addEventListener('keyup', this.keyupHandler); - this.pmaControl(); + this.configControl(); }, beforeUnmount() { window.removeEventListener('message', this.eventHandler);