Update main.lua

This commit is contained in:
Andyyy7666
2021-12-27 14:50:26 +01:00
committed by GitHub
parent 7d5394087e
commit 2c70802418

View File

@@ -157,8 +157,8 @@ AddEventHandler("addCash", function(amount, characterid)
end) end)
-- This is used to find out how much money the player has and use it in the client to show it on the ui. -- This is used to find out how much money the player has and use it in the client to show it on the ui.
RegisterNetEvent("updateMoney") RegisterNetEvent("getMoney")
AddEventHandler("updateMoney", function(characterid) AddEventHandler("getMoney", function(characterid)
local player = source local player = source
exports.oxmysql:query("SELECT cash, bank FROM characters WHERE license = ? AND character_id = ?", {GetPlayerIdentifierFromType("license", player), characterid}, function(result) exports.oxmysql:query("SELECT cash, bank FROM characters WHERE license = ? AND character_id = ?", {GetPlayerIdentifierFromType("license", player), characterid}, function(result)
if result then if result then