Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alp1x committed Mar 6, 2023
1 parent 46a3b81 commit fa993a1
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion checker/checkversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
2 changes: 1 addition & 1 deletion checker/version.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 5 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
24 changes: 12 additions & 12 deletions logs/logs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = '',
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion server/qb-commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 12 additions & 6 deletions web/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
},
},
Expand All @@ -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);
Expand Down

0 comments on commit fa993a1

Please sign in to comment.