diff --git a/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_logging.lua b/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_logging.lua index 401dcf6..b83c150 100644 --- a/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_logging.lua +++ b/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_logging.lua @@ -26,12 +26,12 @@ function GlorifiedBanking.LogDeposit( ply, depositAmount ) end function GlorifiedBanking.LogTransfer( ply, receiver, transferAmount ) - GlorifiedBanking.SQL.Query( "INSERT INTO `gb_logs`( `Date`, `Type`, `SteamID`, `ReceiverSteamID`, `Amount` ) VALUES ( " .. os.time() .. ", 'Transfer', '" .. ply:SteamID64() .. "', '" .. receiver:SteamID() .. "', " .. transferAmount .. " )" ) + GlorifiedBanking.SQL.Query( "INSERT INTO `gb_logs`( `Date`, `Type`, `SteamID`, `ReceiverSteamID`, `Amount` ) VALUES ( " .. os.time() .. ", 'Transfer', '" .. ply:SteamID64() .. "', '" .. receiver:SteamID64() .. "', " .. transferAmount .. " )" ) table.insert( GlorifiedBanking.Logs, { ["Date"] = os.time(), ["Type"] = "Transfer", ["SteamID"] = ply:SteamID64(), - ["ReceiverSteamID"] = receiver:SteamID(), + ["ReceiverSteamID"] = receiver:SteamID64(), ["Amount"] = transferAmount } ) end diff --git a/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_net.lua b/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_net.lua index 1aeb44d..0d176bb 100644 --- a/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_net.lua +++ b/lua/glorifiedbanking/modules/core/sv_glorifiedbanking_net.lua @@ -244,7 +244,7 @@ net.Receive( "GlorifiedBanking.AdminPanel.PlayerListOpened", function( len, ply if GlorifiedBanking.HasPermission( ply, "glorifiedbanking_openadminpanel" ) then local playerList = {} for k, v in ipairs( player.GetAll() ) do - playerList[ v:SteamID() ] = GlorifiedBanking.GetPlayerBalance( v ) + playerList[v:UserID()] = GlorifiedBanking.GetPlayerBalance( v ) end net.Start( "GlorifiedBanking.AdminPanel.PlayerListOpened.SendInfo" ) diff --git a/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_player.lua b/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_player.lua index 2c0bab5..2249ecd 100644 --- a/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_player.lua +++ b/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_player.lua @@ -21,7 +21,7 @@ function PANEL:AddPlayer(ply, balance) if IsValid(GlorifiedBanking.UI.BalancePopup) then return end GlorifiedBanking.UI.BalancePopup = vgui.Create("GlorifiedBanking.BalancePopup") - GlorifiedBanking.UI.BalancePopup.SteamID = self.Player:SteamID() + GlorifiedBanking.UI.BalancePopup.SteamID = self.Player:SteamID64() end self.ResetBalance = vgui.Create("DButton", self) @@ -38,7 +38,7 @@ function PANEL:AddPlayer(ply, balance) if IsValid(GlorifiedBanking.UI.ConfirmationPopup) then return end GlorifiedBanking.UI.ConfirmationPopup = vgui.Create("GlorifiedBanking.ConfirmationPopup") - GlorifiedBanking.UI.ConfirmationPopup.SteamID = self.Player:SteamID() + GlorifiedBanking.UI.ConfirmationPopup.SteamID = self.Player:SteamID64() end self.ViewTransactions = vgui.Create("DButton", self) diff --git a/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_players.lua b/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_players.lua index f1c3706..ca92adf 100644 --- a/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_players.lua +++ b/lua/glorifiedbanking/modules/ui/cl_glorifiedbanking_players.lua @@ -52,17 +52,15 @@ end vgui.Register("GlorifiedBanking.Players", PANEL, "Panel") net.Receive("GlorifiedBanking.AdminPanel.PlayerListOpened.SendInfo", function() - local playersBals = util.JSONToTable(net.ReadLargeString()) + local playersBals = net.ReadTableAsString() if not playersBals then return end local panel = GlorifiedBanking.UI.AdminMenu.Page if not panel.ResetPlayers then return end - local players = player.GetAll() - panel:ResetPlayers() - for k,v in ipairs(players) do - panel:AddPlayer(v, playersBals[v:SteamID()] or -1) + for k, v in ipairs(player.GetAll()) do + panel:AddPlayer( v, playersBals[v:UserID()] or -1 ) end end)