Hi all,
Does anyone know how I can bring another id from the database instead of this one?
Config.PlayerServerId = function()
return GetPlayerServerId(PlayerId())
end
I tried something like that, but I’m a beginner.
I took this from another script that displays what I want and tried to adapt it for what I need, but it didn’t turn out well.
If you can help me, please.
Config.PlayerServerId = function()
local xPlayer = ESX.GetPlayerFromId(source)
print(xPlayer.identifier)
MySQL.Async.fetchAll('SELECT * FROM cnp WHERE identifier = @identifier', {
['@identifier'] = xPlayer.identifier,
}, function(result)
result.character_id
end)
end