ox_inventory icon indicating copy to clipboard operation
ox_inventory copied to clipboard

No notification when inventory full

Open RebornOG opened this issue 3 years ago • 4 comments

Players dont receive a notification that they are overburdened when picking up items from the ground. They cant pickup the item, its just about a notification that they cant.

RebornOG avatar Jan 10 '22 00:01 RebornOG

I always forget the average FiveM player is braindead and can't tell that trying to pick up 20kg of shit when they have an available capacity of 4kg means it will fail.

It'll be added soon.

thelindat avatar Jan 10 '22 04:01 thelindat

Another one that i think people will be confused on is trying to use an item while having a weapon out

GeerdoDaGr8 avatar Jan 10 '22 05:01 GeerdoDaGr8

What he could be nice is , is like Skyrim.

whne your inventory is full you walk very very slow 🤷‍♂️ He could Ben another way to work when a player have a heavy thing to transport from the a point to b point !

frazz1234 avatar Feb 07 '22 04:02 frazz1234

In file ox_inventory/modules/bridge/client.lua I have add this to slowdown the player and show a notification. Feel free to use and adapt it to your server

local sleep = 500
Citizen.CreateThread(function() 
	while PlayerData and shared do
		Wait(sleep)
		if PlayerData.weight and shared.playerweight then
			if PlayerData.weight > shared.playerweight then
				if sleep == 500 then
					exports["skeexsNotify"]:TriggerNotification({
						['type'] = types or "error",
						['message'] = 'Votre poid vous ralentie!!!'
					})
				end
				sleep = 5
				ratio = shared.playerweight/(PlayerData.weight+100000)
				SetPedMoveRateOverride(PlayerPedId(), ratio)
				DisableControlAction(0, 22, true) -- Jump
			else
				sleep = 500
			end
		end
	end
end)

RedAlex avatar Mar 16 '22 17:03 RedAlex