From f36ec4811110792f469f933a57f10e6ddae85ac0 Mon Sep 17 00:00:00 2001 From: srslyyyy <51768772+srslyyyy@users.noreply.github.com> Date: Tue, 16 Jan 2024 08:52:11 +0100 Subject: [PATCH 1/2] Replace to client. --- [admin]/admin2/server/admin_ACL.lua | 42 ++++++------- [admin]/admin2/server/admin_functions.lua | 62 +++++++++--------- [admin]/admin2/server/admin_server.lua | 76 +++++++++++------------ [admin]/admin2/server/admin_session.lua | 10 +-- [admin]/admin2/server/admin_sync.lua | 4 +- 5 files changed, 97 insertions(+), 97 deletions(-) diff --git a/[admin]/admin2/server/admin_ACL.lua b/[admin]/admin2/server/admin_ACL.lua index 9d0c584da..73558671a 100644 --- a/[admin]/admin2/server/admin_ACL.lua +++ b/[admin]/admin2/server/admin_ACL.lua @@ -245,21 +245,21 @@ function moo() if (action == "password") then action = nil if (not arg[1]) then - outputChatBox("Error - Password missing.", source, 255, 0, 0) + outputChatBox("Error - Password missing.", client, 255, 0, 0) elseif (not arg[2]) then - outputChatBox("Error - New password missing.", source, 255, 0, 0) + outputChatBox("Error - New password missing.", client, 255, 0, 0) elseif (not arg[3]) then - outputChatBox("Error - Confirm password.", source, 255, 0, 0) + outputChatBox("Error - Confirm password.", client, 255, 0, 0) elseif (tostring(arg[2]) ~= tostring(arg[3])) then - outputChatBox("Error - Passwords do not match.", source, 255, 0, 0) + outputChatBox("Error - Passwords do not match.", client, 255, 0, 0) else - local account = getAccount(getPlayerUserName(source), tostring(arg[1])) + local account = getAccount(getPlayerUserName(client), tostring(arg[1])) if (account) then action = "password" setAccountPassword(account, arg[2]) mdata = arg[2] else - outputChatBox("Error - Invalid password.", source, 255, 0, 0) + outputChatBox("Error - Invalid password.", client, 255, 0, 0) end end elseif (action == "sync") then @@ -294,7 +294,7 @@ function moo() end end end - triggerClientEvent(source, "aAdminACL", root, type, tableOut) + triggerClientEvent(client, "aAdminACL", root, type, tableOut) elseif (action == "aclcreate") then local name = arg[2] if ((name) and (string.len(name) >= 1)) then @@ -309,9 +309,9 @@ function moo() action = nil end end - triggerEvent("aAdmin", source, "sync", "aclgroups") + triggerEvent("aAdmin", client, "sync", "aclgroups") else - outputChatBox("Error - Invalid " .. arg[1] .. " name", source, 255, 0, 0) + outputChatBox("Error - Invalid " .. arg[1] .. " name", client, 255, 0, 0) end elseif (action == "acldestroy") then local name = arg[2] @@ -330,7 +330,7 @@ function moo() action = nil end end - triggerEvent("aAdmin", source, "sync", "aclgroups") + triggerEvent("aAdmin", client, "sync", "aclgroups") elseif (action == "acladd") then if (arg[3]) then action = action @@ -342,14 +342,14 @@ function moo() action = nil outputChatBox( "Error adding object '" .. tostring(object) .. "' to group '" .. tostring(arg[2]) .. "'", - source, + client, 255, 0, 0 ) else mdata2 = "Object '" .. arg[3] .. "'" - triggerEvent("aAdmin", source, "sync", "aclobjects", arg[2]) + triggerEvent("aAdmin", client, "sync", "aclobjects", arg[2]) end elseif (arg[1] == "acl") then local group = aclGetGroup(arg[2]) @@ -358,14 +358,14 @@ function moo() action = nil outputChatBox( "Error adding ACL '" .. tostring(arg[3]) .. "' to group '" .. tostring(arg[2]) .. "'", - source, + client, 255, 0, 0 ) else mdata2 = "ACL '" .. arg[3] .. "'" - triggerEvent("aAdmin", source, "sync", "aclobjects", arg[2]) + triggerEvent("aAdmin", client, "sync", "aclobjects", arg[2]) end elseif (arg[1] == "right") then local acl = aclGet(arg[2]) @@ -387,14 +387,14 @@ function moo() outputChatBox( "Error - object '" .. tostring(object) .. "' does not exist in group '" .. tostring(arg[2]) .. "'", - source, + client, 255, 0, 0 ) else mdata2 = "Object '" .. arg[3] .. "'" - triggerEvent("aAdmin", source, "sync", "aclobjects", arg[2]) + triggerEvent("aAdmin", client, "sync", "aclobjects", arg[2]) end elseif (arg[1] == "acl") then local group = aclGetGroup(arg[2]) @@ -403,14 +403,14 @@ function moo() action = nil outputChatBox( "Error - ACL '" .. tostring(arg[3]) .. "' does not exist in group '" .. tostring(arg[2]) .. "'", - source, + client, 255, 0, 0 ) else mdata2 = "ACL '" .. arg[3] .. "'" - triggerEvent("aAdmin", source, "sync", "aclobjects", arg[2]) + triggerEvent("aAdmin", client, "sync", "aclobjects", arg[2]) end elseif (arg[1] == "right") then local acl = aclGet(arg[2]) @@ -419,7 +419,7 @@ function moo() action = nil outputChatBox( "Error - right '" .. tostring(arg[3]) .. "' does not exist in ACL '" .. tostring(arg[2]) .. "'", - source, + client, 255, 0, 0 @@ -427,7 +427,7 @@ function moo() else mdata = "ACL '" .. arg[2] .. "'" mdata2 = "Right '" .. arg[3] .. "'" - triggerEvent("aAdmin", source, "sync", "aclrights", arg[2]) + triggerEvent("aAdmin", client, "sync", "aclrights", arg[2]) end end else @@ -435,6 +435,6 @@ function moo() end end if (action ~= nil) then - aAction("admin", action, source, false, mdata, mdata2) + aAction("admin", action, client, false, mdata, mdata2) end end diff --git a/[admin]/admin2/server/admin_functions.lua b/[admin]/admin2/server/admin_functions.lua index dd92a674b..a031be18e 100644 --- a/[admin]/admin2/server/admin_functions.lua +++ b/[admin]/admin2/server/admin_functions.lua @@ -11,7 +11,7 @@ aFunctions = { success = createTeam(name) end if (not success) then - outputChatBox('Team "' .. name .. '" could not be created.', source, 255, 0, 0) + outputChatBox('Team "' .. name .. '" could not be created.', client, 255, 0, 0) end return success, name end, @@ -26,10 +26,10 @@ aFunctions = { }, player = { ["kick"] = function(player, data) - setTimer(kickPlayer, 100, 1, player, source, data) + setTimer(kickPlayer, 100, 1, player, client, data) end, ["ban"] = function(player, data) - setTimer(banPlayer, 100, 1, player, true, true, true, source, data) + setTimer(banPlayer, 100, 1, player, true, true, true, client, data) end, ["mute"] = function(player) setPlayerMuted(player, true) @@ -69,7 +69,7 @@ aFunctions = { local textDisplay = textCreateDisplay() local textItem = textCreateTextItem( - "(ADMIN)" .. stripColorCodes(getPlayerName(source)) .. ":\n\n" .. text, + "(ADMIN)" .. stripColorCodes(getPlayerName(client)) .. ":\n\n" .. text, 0.5, 0.5, 2, @@ -121,7 +121,7 @@ aFunctions = { return false end if (not setPlayerMoney(player, money)) then - outputChatBox("Invalid money value", source, 255, 0, 0) + outputChatBox("Invalid money value", client, 255, 0, 0) return false end return true, money @@ -180,7 +180,7 @@ aFunctions = { if (getPedOccupiedVehicle(player)) then outputChatBox( "Unable to give a jetpack - " .. getPlayerName(player) .. " is in a vehicle", - source, + client, 255, 0, 0 @@ -199,17 +199,17 @@ aFunctions = { if (group) then if (data == true) then aclGroupAddObject(group, "user." .. getAccountName(account)) - triggerEvent(EVENT_SYNC, source, SYNC_PLAYERACL, player) + triggerEvent(EVENT_SYNC, client, SYNC_PLAYERACL, player) return "admina", groupName elseif (data == false) then aclGroupRemoveObject(group, "user." .. getAccountName(account)) aPlayers[player]["chat"] = false - triggerEvent(EVENT_SYNC, source, SYNC_PLAYERACL, player) + triggerEvent(EVENT_SYNC, client, SYNC_PLAYERACL, player) return "adminr", groupName end end else - outputChatBox("Error - Player is not logged in.", source, 255, 100, 100) + outputChatBox("Error - Player is not logged in.", client, 255, 100, 100) end end, ["givevehicle"] = function(player, id) @@ -266,10 +266,10 @@ aFunctions = { end end, ["getscreen"] = function(player, quality) - getPlayerScreen(player, source, quality) + getPlayerScreen(player, client, quality) end, ["warp"] = function(player) - warpPlayer(source, player) + warpPlayer(client, player) end, ["warpto"] = function(player, data) warpPlayer(player, data) @@ -307,7 +307,7 @@ aFunctions = { end, ["setpaintjob"] = function(player, vehicle, id) if (not setVehiclePaintjob(vehicle, id)) then - outputChatBox("Invalid Paint job ID", source, 255, 0, 0) + outputChatBox("Invalid Paint job ID", client, 255, 0, 0) return false end return true, id @@ -355,30 +355,30 @@ aFunctions = { ["setsetting"] = function(resource, setting, value) if (setting and value) then set("*" .. getResourceName(resource) .. "." .. setting, value) - requestSync(source, SYNC_RESOURCE, getResourceName(resource)) + requestSync(client, SYNC_RESOURCE, getResourceName(resource)) end end }, server = { ["setgame"] = function(game) if (not setGameType(tostring(game))) then - outputChatBox("Error setting game type.", source, 255, 0, 0) + outputChatBox("Error setting game type.", client, 255, 0, 0) return false end - requestSync(source, SYNC_SERVER) + requestSync(client, SYNC_SERVER) return true, tostring(game) end, ["setmap"] = function(map) if (not setMapName(tostring(map))) then - outputChatBox("Error setting map name.", source, 255, 0, 0) + outputChatBox("Error setting map name.", client, 255, 0, 0) return false end - requestSync(source, SYNC_SERVER) + requestSync(client, SYNC_SERVER) return true, tostring(map) end, ["settime"] = function(minutes, seconds) if (not setTime(tonumber(minutes), tonumber(seconds))) then - outputChatBox("Error setting time.", source, 255, 0, 0) + outputChatBox("Error setting time.", client, 255, 0, 0) return false end return true, tostring(minutes) .. ":" .. tostring(seconds) @@ -386,35 +386,35 @@ aFunctions = { ["setpassword"] = function(password) if (not password or password == "") then setServerPassword(nil) - requestSync(source, SYNC_SERVER) + requestSync(client, SYNC_SERVER) return "resetpassword" elseif (string.len(password) > 32) then - outputChatBox("Set password: 32 characters max", source, 255, 0, 0) + outputChatBox("Set password: 32 characters max", client, 255, 0, 0) return false elseif (not setServerPassword(password)) then - outputChatBox("Error setting password", source, 255, 0, 0) + outputChatBox("Error setting password", client, 255, 0, 0) return false end - requestSync(source, SYNC_SERVER) + requestSync(client, SYNC_SERVER) return true, password end, ["setweather"] = function(id) if (not setWeather(tonumber(id))) then - outputChatBox("Error setting weather.", source, 255, 0, 0) + outputChatBox("Error setting weather.", client, 255, 0, 0) return false end return true, id .. " " .. getWeatherNameFromID(tonumber(id)) end, ["blendweather"] = function(id) if (not setWeatherBlended(tonumber(id))) then - outputChatBox("Error blending weather.", source, 255, 0, 0) + outputChatBox("Error blending weather.", client, 255, 0, 0) return false end return true, id .. " " .. getWeatherNameFromID(tonumber(id)) end, ["setgamespeed"] = function(speed) if (not setGameSpeed(tonumber(speed))) then - outputChatBox("Error setting game speed.", source, 255, 0, 0) + outputChatBox("Error setting game speed.", client, 255, 0, 0) return false end return true, speed @@ -425,35 +425,35 @@ aFunctions = { setPedGravity(player, getGravity()) end else - outputChatBox("Error setting gravity.", source, 255, 0, 0) + outputChatBox("Error setting gravity.", client, 255, 0, 0) return false end return true, gravity end, ["setblurlevel"] = function(level) if (not setBlurLevel(level)) then - outputChatBox("Error setting blur level.", source, 255, 0, 0) + outputChatBox("Error setting blur level.", client, 255, 0, 0) return false end return true, level end, ["setheathazelevel"] = function(level) if (not setHeatHaze(level)) then - outputChatBox("Error setting heat haze level.", source, 255, 0, 0) + outputChatBox("Error setting heat haze level.", client, 255, 0, 0) return false end return true, level end, ["setwaveheight"] = function(height) if (not setWaveHeight(height)) then - outputChatBox("Error setting wave height.", source, 255, 0, 0) + outputChatBox("Error setting wave height.", client, 255, 0, 0) return false end return true, height end, ["setfpslimit"] = function(limit) if (not setFPSLimit(limit)) then - outputChatBox("Error setting fps limit.", source, 255, 0, 0) + outputChatBox("Error setting fps limit.", client, 255, 0, 0) return false end return true, limit @@ -475,7 +475,7 @@ aFunctions = { end end, ["shutdown"] = function() - shutdown("triggered by "..getPlayerName(source)) + shutdown("triggered by "..getPlayerName(client)) end, ["clearchat"] = function() clearChatBox() diff --git a/[admin]/admin2/server/admin_server.lua b/[admin]/admin2/server/admin_server.lua index fc2e5366b..3c591fa20 100644 --- a/[admin]/admin2/server/admin_server.lua +++ b/[admin]/admin2/server/admin_server.lua @@ -18,13 +18,13 @@ aWeathers = {} function aHandleIP2CUpdate() local playersToUpdate = false - local playersTable = getElementsByType("player") -- cache result, save function call + local playersTable = getElementsByType("player") for playerID = 1, #playersTable do local playerElement = playersTable[playerID] if not playersToUpdate then - playersToUpdate = {} -- create table only when there are at least one player + playersToUpdate = {} end updatePlayerCountry(playerElement) @@ -32,7 +32,7 @@ function aHandleIP2CUpdate() end if not playersToUpdate then - return -- if there are no players, stop further code execution + return end for playerID = 1, #playersTable do @@ -207,7 +207,7 @@ addEventHandler( "aTeam", root, function(action, name, ...) - if (hasObjectPermissionTo(source, "command." .. action)) then + if (hasObjectPermissionTo(client, "command." .. action)) then local func = aFunctions.team[action] if (func) then local result, mdata1, mdata2 = func(name, ...) @@ -215,11 +215,11 @@ addEventHandler( if (type(result) == "string") then action = result end - aAction("team", action, source, false, mdata1, mdata2) + aAction("team", action, client, false, mdata1, mdata2) end end else - outputChatBox("Access denied for '" .. tostring(action) .. "'", source, 255, 168, 0) + outputChatBox("Access denied for '" .. tostring(action) .. "'", client, 255, 168, 0) end end ) @@ -229,7 +229,7 @@ addEventHandler( "aPlayer", root, function(player, action, ...) - if (hasObjectPermissionTo(source, "command." .. action)) then + if (hasObjectPermissionTo(client, "command." .. action)) then local mdata1, mdata2 local func = aFunctions.player[action] if (func) then @@ -239,11 +239,11 @@ addEventHandler( if (type(result) == "string") then action = result end - aAction("player", action, source, player, mdata1, mdata2) + aAction("player", action, client, player, mdata1, mdata2) end end else - outputChatBox("Access denied for '" .. tostring(action) .. "'", source, 255, 168, 0) + outputChatBox("Access denied for '" .. tostring(action) .. "'", client, 255, 168, 0) end end ) @@ -257,7 +257,7 @@ addEventHandler( if (not vehicle) then return end - if (hasObjectPermissionTo(source, "command." .. action)) then + if (hasObjectPermissionTo(client, "command." .. action)) then local mdata1, mdata2 local func = aFunctions.vehicle[action] if (func) then @@ -271,8 +271,8 @@ addEventHandler( for i = 0, seats do local passenger = getVehicleOccupant(vehicle, i) if (passenger) then - if ((passenger == player) and (getPedOccupiedVehicle(source) ~= vehicle)) then - aAction("vehicle", action, source, passenger, mdata) + if ((passenger == player) and (getPedOccupiedVehicle(client) ~= vehicle)) then + aAction("vehicle", action, client, passenger, mdata) else aAction("vehicle", action, passenger, passenger, mdata1, mdata2) end @@ -281,7 +281,7 @@ addEventHandler( end end else - outputChatBox("Access denied for '" .. tostring(action) .. "'", source, 255, 168, 0) + outputChatBox("Access denied for '" .. tostring(action) .. "'", client, 255, 168, 0) end end ) @@ -298,7 +298,7 @@ addEventHandler( if (not resource) then return end - if (hasObjectPermissionTo(source, "command." .. action)) then + if (hasObjectPermissionTo(client, "command." .. action)) then local func = aFunctions.resource[action] if (func) then local result, mdata1, mdata2 = func(resource, ...) @@ -306,11 +306,11 @@ addEventHandler( if (type(result) == "string") then action = result end - aAction("resource", action, source, player, mdata1, mdata2) + aAction("resource", action, client, player, mdata1, mdata2) end end else - outputChatBox("Access denied for '" .. tostring(action) .. "'", source, 255, 168, 0) + outputChatBox("Access denied for '" .. tostring(action) .. "'", client, 255, 168, 0) end end ) @@ -320,7 +320,7 @@ addEventHandler( "aServer", root, function(action, ...) - if (hasObjectPermissionTo(source, "command." .. action)) then + if (hasObjectPermissionTo(client, "command." .. action)) then local func = aFunctions.server[action] if (func) then local result, mdata1, mdata2 = func(...) @@ -328,11 +328,11 @@ addEventHandler( if (type(result) == "string") then action = result end - aAction("server", action, source, player, mdata1, mdata2) + aAction("server", action, client, player, mdata1, mdata2) end end else - outputChatBox("Access denied for '" .. tostring(action) .. "'", source, 255, 168, 0) + outputChatBox("Access denied for '" .. tostring(action) .. "'", client, 255, 168, 0) end end ) @@ -342,7 +342,7 @@ addEventHandler( "aServerGlitchRefresh", root, function() - triggerClientEvent("aClientRefresh", client, isGlitchEnabled("quickreload"), isGlitchEnabled("fastmove"), isGlitchEnabled("fastfire"), isGlitchEnabled("crouchbug"), isGlitchEnabled("highcloserangedamage"), isGlitchEnabled("hitanim"), isGlitchEnabled("fastsprint"), isGlitchEnabled("baddrivebyhitbox"), isGlitchEnabled("quickstand"), isGlitchEnabled("kickoutofvehicle_onmodelreplace")) + triggerClientEvent(client, "aClientRefresh", client, isGlitchEnabled("quickreload"), isGlitchEnabled("fastmove"), isGlitchEnabled("fastfire"), isGlitchEnabled("crouchbug"), isGlitchEnabled("highcloserangedamage"), isGlitchEnabled("hitanim"), isGlitchEnabled("fastsprint"), isGlitchEnabled("baddrivebyhitbox"), isGlitchEnabled("quickstand"), isGlitchEnabled("kickoutofvehicle_onmodelreplace")) end ) @@ -355,39 +355,39 @@ addEventHandler( local time = getRealTime() local id = #aReports + 1 aReports[id] = {} - aReports[id].author = getPlayerName(source) + aReports[id].author = getPlayerName(client) aReports[id].category = tostring(data.category) aReports[id].subject = tostring(data.subject) aReports[id].text = tostring(data.message) aReports[id].time = string.format("%02d/%02d %02d:%02d", time.monthday, time.month+1, time.hour, time.minute) aReports[id].read = false elseif (action == "get") then - triggerClientEvent(source, "aMessage", source, "get", aReports) + triggerClientEvent(client, "aMessage", client, "get", aReports) return elseif (action == "read") then if (aReports[data]) then aReports[data].read = true end - triggerClientEvent(source, "aMessage", source, "get", aReports) + triggerClientEvent(client, "aMessage", client, "get", aReports) elseif (action == "delete") then local id = data[1] if (not aReports[id]) then - outputChatBox("Error - Message not found.", source, 255, 0, 0) - triggerClientEvent(source, "aMessage", source, "get", aReports) + outputChatBox("Error - Message not found.", client, 255, 0, 0) + triggerClientEvent(client, "aMessage", client, "get", aReports) return end local message = data[2] for key, value in pairs(aReports[id]) do if (message[key] ~= value) then - outputChatBox("Error - Message mismatch, please try again.", source, 255, 0, 0) - triggerClientEvent(source, "aMessage", source, "get", aReports) + outputChatBox("Error - Message mismatch, please try again.", client, 255, 0, 0) + triggerClientEvent(client, "aMessage", client, "get", aReports) return end end table.remove(aReports, id) - triggerClientEvent(source, "aMessage", source, "get", aReports) + triggerClientEvent(client, "aMessage", client, "get", aReports) end for id, p in ipairs(getElementsByType("player")) do if (hasObjectPermissionTo(p, "general.adminpanel")) then @@ -402,32 +402,32 @@ addEventHandler( "aBans", root, function(action, data) - if (hasObjectPermissionTo(source, "command." .. action)) then + if (hasObjectPermissionTo(client, "command." .. action)) then local mdata = "" local more = "" if (action == "banip") then mdata = data - if (not BanIP(data, source)) then + if (not BanIP(data, client)) then action = nil end elseif (action == "banserial") then mdata = data if (isValidSerial(data)) then - if (not BanSerial(string.upper(data), source)) then + if (not BanSerial(string.upper(data), client)) then action = nil end else - outputChatBox("Error - Invalid serial", source, 255, 0, 0) + outputChatBox("Error - Invalid serial", client, 255, 0, 0) action = nil end elseif (action == "unbanip") then mdata = data - if (not UnbanIP(data, source)) then + if (not UnbanIP(data, client)) then action = nil end elseif (action == "unbanserial") then mdata = data - if (not UnbanSerial(data, source)) then + if (not UnbanSerial(data, client)) then action = nil end else @@ -435,12 +435,12 @@ addEventHandler( end if (action ~= nil) then - aAction("bans", action, source, false, mdata, more) - triggerEvent("aSync", source, "sync", "bans") + aAction("bans", action, client, false, mdata, more) + triggerEvent("aSync", client, "sync", "bans") end return true end - outputChatBox("Access denied for '" .. tostring(action) .. "'", source, 255, 168, 0) + outputChatBox("Access denied for '" .. tostring(action) .. "'", client, 255, 168, 0) return false end ) @@ -455,7 +455,7 @@ addEventHandler( end for id, player in ipairs(getElementsByType("player")) do if (aPlayers[player]["chat"]) then - triggerClientEvent(player, "aClientAdminChat", source, chat) + triggerClientEvent(player, "aClientAdminChat", client, chat) end end end diff --git a/[admin]/admin2/server/admin_session.lua b/[admin]/admin2/server/admin_session.lua index c6a8c608d..a3230b3f9 100644 --- a/[admin]/admin2/server/admin_session.lua +++ b/[admin]/admin2/server/admin_session.lua @@ -37,14 +37,14 @@ addEventHandler( root, function(type) if (type == SESSION_START) then - if (aPlayers[source]) then - aPlayers[source]["aLoaded"] = true + if (aPlayers[client]) then + aPlayers[client]["aLoaded"] = true end end if (type == SESSION_UPDATE or type == SESSION_START) then - if (hasObjectPermissionTo(source, "general.adminpanel")) then + if (hasObjectPermissionTo(client, "general.adminpanel")) then local tableOut = {} - local account = "user." .. getAccountName(getPlayerAccount(source)) + local account = "user." .. getAccountName(getPlayerAccount(client)) for gi, group in ipairs(aclGroupList()) do for oi, object in ipairs(aclGroupListObjects(group)) do if ((object == account) or (object == "user.*")) then @@ -61,7 +61,7 @@ addEventHandler( end end end - triggerClientEvent(source, EVENT_SESSION, source, tableOut) + triggerClientEvent(client, EVENT_SESSION, client, tableOut) end end end diff --git a/[admin]/admin2/server/admin_sync.lua b/[admin]/admin2/server/admin_sync.lua index 0f1deba6d..8a018b370 100644 --- a/[admin]/admin2/server/admin_sync.lua +++ b/[admin]/admin2/server/admin_sync.lua @@ -18,7 +18,7 @@ addEventHandler( if (not isElement(data)) then return end - aPlayers[source]["sync"] = data + aPlayers[client]["sync"] = data tableOut["mute"] = isPlayerMuted(data) tableOut["freeze"] = isElementFrozen(data) tableOut["money"] = getPlayerMoney(data) @@ -122,7 +122,7 @@ addEventHandler( tableOut["unread"] = unread tableOut["total"] = total end - triggerClientEvent(source, EVENT_SYNC, theSource, type, tableOut) + triggerClientEvent(client, EVENT_SYNC, theSource, type, tableOut) end ) From 786df073e381dfc15d4dd22d9db3856c02e3104f Mon Sep 17 00:00:00 2001 From: srslyyyy <51768772+srslyyyy@users.noreply.github.com> Date: Tue, 16 Jan 2024 08:58:00 +0100 Subject: [PATCH 2/2] Use shared types, beautify meta. --- [admin]/admin2/meta.xml | 221 ++++++++++++++++++++-------------------- 1 file changed, 111 insertions(+), 110 deletions(-) diff --git a/[admin]/admin2/meta.xml b/[admin]/admin2/meta.xml index 8e3c95163..3f92c2800 100644 --- a/[admin]/admin2/meta.xml +++ b/[admin]/admin2/meta.xml @@ -1,113 +1,114 @@ - - + + - - - - true - - -