I understand, but there isn’t even a html file… how are you supposed to display something in-game ?
And the code you added just adds the user’s money to the user’s money… find the error
Yeah because in the original essential it doesn’t already load the money…
function LoadUser(identifier, source, new)
local executed_query = MySQL:executeQuery("SELECT * FROM users WHERE identifier = '@name'", {['@name'] = identifier})
local result = MySQL:getResults(executed_query, {'permission_level', 'money', 'identifier', 'group', 'iscop'}, "identifier")
local group = groups[result[1].group]
Users[source] = Player(source, result[1].permission_level, result[1].money, result[1].identifier, result[1].iscop, group)
TriggerEvent('es:playerLoaded', source, Users[source])
if(true)then
TriggerClientEvent('es:setPlayerDecorator', source, 'rank', Users[source]:getPermissions())
end
if(true)then
TriggerEvent('es:newPlayerLoaded', source, Users[source])
end
end
Yes it load the money … but it doesnt set the money for the user
in the script you show it load the data of the user from the databse and define what “user.” is but thats it …
AddEventHandler('es:playerLoaded', function(source) -- detect if the user loaded
TriggerEvent('es:getPlayerFromId', source, function(user) -- get identifier of the user
user:setMoney((user.money)) -- set the money of the user using the script you just showed me
end)
end)