TriggerServerCallback esx_property Problem

When I’m trying to enter or visit any instance nothing happens, there is no errors at F8, but there is one error in server prompt: es_extended: TriggerServerCallback => [esx_property:getAccessProperties] does not exists I dont have any idea why it happens. There is my all TriggerServerCallbacks in client.lua:

AddEventHandler('esx:playerLoaded', function(xPlayer)
	ESX.TriggerServerCallback('esx_property:getProperties', function(properties)
		Config.Properties = properties
		CreateBlips()
	end)

	ESX.TriggerServerCallback('esx_property:getOwnedProperties', function(ownedProperties)
		for i=1, #ownedProperties, 1 do
			SetPropertyOwned(ownedProperties[i], true)
		end
	end)

	ESX.TriggerServerCallback('esx_property:getAccessProperties', function(accessProperties)
		propertyAccess=accessProperties
	end)
end)

-- only used when script is restarting mid-session
RegisterNetEvent('esx_property:sendProperties')
AddEventHandler('esx_property:sendProperties', function(properties)
	Config.Properties = properties
	CreateBlips()

	ESX.TriggerServerCallback('esx_property:getOwnedProperties', function(ownedProperties)
		for i=1, #ownedProperties, 1 do
			SetPropertyOwned(ownedProperties[i], true)
		end
	end)
	ESX.TriggerServerCallback('esx_property:getAccessProperties', function(accessProperties)
		propertyAccess=accessProperties
	end)
end)
`
There is TriggerServerCallbacks in server.lua: `ESX.RegisterServerCallback('esx_property:getAccessProperties',function(source,cb)
	MySQL.Async.fetchAll('SELECT * FROM owned_properties WHERE shared = @shared', {["@shared"]=ESX.GetPlayerFromId(source).identifier}, function(data)
		cbdata = {}
        for k,v in ipairs(data) do
            ownerName = MySQL.Sync.fetchAll("SELECT name FROM users WHERE identifier=@identifier",{["@identifier"]=v.owner})[1]["name"]
			table.insert(cbdata,{name=v.name,owner=v.owner,shared=v.shared,ownerName=ownerName~=nil and ownerName or "N/A"})
		end
		cb(cbdata)
	end)
end)
ESX.RegisterServerCallback("esx_property:giveKeys",function(source, cb, property, target)
	local xPlayer = ESX.GetPlayerFromId(source)
    local xTarget = ESX.GetPlayerFromId(target)
    local oldShared = MySQL.Sync.fetchAll("SELECT shared FROM owned_properties WHERE name = @name AND owner = @owner",{["@owner"]=xPlayer.identifier,["@name"]=property.name})[1]["shared"]
	MySQL.Async.execute("UPDATE owned_properties SET shared = @shared WHERE owner = @owner AND name = @name",{["@shared"]=xTarget.identifier,["@owner"]=xPlayer.identifier,["@name"]=property.name},function(rowsChanged)
		cb()
	end)
    Citizen.CreateThread(function()
        if oldShared~=nil then
            local xShared = ESX.GetPlayerFromIdentifier(oldShared)
            if xShared~=nil then TriggerClientEvent("esx_property:removeKeys",xShared.source,property.name,xPlayer.identifier) end
        end
        TriggerClientEvent("esx_property:keysReceived",target,{name=property.name,ownerName=xPlayer.getName(),owner=xPlayer.identifier,shared=xTarget.identifier})
    end)
end)

Excuse my english

Your are french ?

Im not

ok no problem, for simplicity you must reinstall your script because it misses a piece of the script in your server.lua

I did it few times and still nothing

There is no callback named that

Bro. I guess you bought that script. Why? If you buy a script that isn’t public, why do you ask us for help? Ask the creator.

Use the original esx_property

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.