[RELEASE][LUA] ESX Deliveries REMAKE

Your ESX version is outdate, you can try this to fix it without update ESX:

  1. Edit es_extended/server/classes/player.lua
  2. Find return self
  3. Add this before it:
	self.showNotification = function(msg)
		TriggerClientEvent('esx:showNotification', self.source, msg)
	end
  1. Then it should look like this:
	self.getWeapon = function(weaponName)
		for i=1, #self.loadout, 1 do
			if self.loadout[i].name == weaponName then
				return i, self.loadout[i]
			end
		end

		return nil
	end
	-- Add this
	self.showNotification = function(msg)
		TriggerClientEvent('esx:showNotification', self.source, msg)
	end
	return self
end

okay~that’s the solution of the notification problem.
but now comes another one
i spawn a van and trying to delivering stuff, and after taking the goods to the point…
system do give me the money, but my character still holding the box@@

(PS… a little suggest, would you pls make this script can run without delivery job? make it optional in config setting O_O?

(it’s still a great job thought :smiley:

here is the fix for the other one just copy paste this into your server.cfg

start esx_deliveries
setr esx_deliveries_reward_scooter 70
setr esx_deliveries_reward_van 80
setr esx_deliveries_reward_truck 100
setr esx_deliveries_safe_deposit_scooter 100
setr esx_deliveries_safe_deposit_van 200
setr esx_deliveries_safe_deposit_truck 300
restart esx_deliveries

this is for the original version not this update one. I would use both but this new one is named the same thing and I don’t feel like tring to find all the mentions of esx_deliveries in this version to rename it to something else… i should though I love this system… if only this dude called it something else… sigh hahaha

I have a small problem nill value to xPlayer. Maybe someone knows how to fix it?

SCRIPT ERROR: @esx_deliveries/server/main.lua:75: attempt to index a nil value (local 'xPlayer')
AddEventHandler('esx_deliveries:getPlayerJob:server', function()
    local xPlayer = ESX.GetPlayerFromId(source)
	print("Player request job: " .. source .. ", " .. xPlayer.job.name)
	TriggerClientEvent('esx_deliveries:setPlayerJob:client', source, xPlayer.job.name)
end)

Can we get a version that does not need the job center.? I love this script, but i want to move some of the jobs to different locations and also use these types of deliver jobs for police and other jobs to earn side money, thanks a ton I love this!

1 Like

hello i have this error! any solution for this? thanks

same problem

AddEventHandler('esx_deliveries:getPlayerJob:server', function()
    local xPlayer = ESX.GetPlayerFromId(source)
	print("Player request job: " .. source .. ", " .. xPlayer.job.name)
	TriggerClientEvent('esx_deliveries:setPlayerJob:client', source, xPlayer.job.name)
end)

to

AddEventHandler('esx_deliveries:getPlayerJob:server', function()
    local xPlayer = ESX.GetPlayerFromId(source)
        if xPlayer ~= nil then
		print("Player request job: " .. source .. ", " .. xPlayer.job.name)
		TriggerClientEvent('esx_deliveries:setPlayerJob:client', source, xPlayer.job.name)
		end
	end)

I believe this should fix that error…taken from here: [How to Fix] [SOLVED] Attempt to index a nil value (local 'xPlayer') - Server crash

Anyways, why does it have a print there? That will spam your console af.

So i followed every step in the readme file and nothing it coming up on the map or anything, please help

Im getting this issue when using this…

What is that speedometer? :slight_smile:

i can’t get in the scooter e press f and nothing happens.

for me this just hides the problem, if you relog and youre getting the xplayer issue it doesnt seem to load your job. so you wont see the delivery blips, unless you go back to the job centre and re give yourself the job.

you need to reload the job from players every Xms…it seems to load once and not again, I’m not using this so I can’t really tell you exactly.

i need a script where people can put other players in the trunk after carrying them and vise versa

Hello,

I have one error with this script, you can help me ?

SCRIPT ERROR: @esx_deliveries/server/main.lua:64: attempt to call a nil value (field ‘showNotification’)

Just found a little bug with the scooter delivery. The prop_paper_bag_01 doesnt show up. All other props work just the prop_paper_bag_01 doesnt. Can you pls fix this? :slight_smile:

how do I change women’s clothing? I change in the config and nothing changes, I registered the place of women’s clothing for men and still dresses in women’s clothing

Can you make the spawned vehicle full tank