This code doesent work…
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
function Steuern()
local _source = source
local xPlayer = ESX.GetplayerFromId(_source)
local StAmount = config.Steuern
xPlayer.removeAccountMoney('bank', Config.Steuern )
TriggerEvent("grv_notify", "#ab0503", "STEUERN", "Du Hast deine Steuern Bezahlt!:", StAmount)
wait(config.SeuerIntervall)
end
RegisterCommand("steuern", function()
print("Test Erfolgreich!")
end)
RegisterCommand("dodo", function()
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xTarget = ESX.GetPlayerFromId(playerId)
print("passed lines 3&4")
xPlayer.removeAccountMoney('bank', Config.Steuern)
print("Passed lines 4&5")
Print("Youre paid ")
end)
Please help.
It comes: xPlayer dont found