Fixed some ESX functions that are used to get the closests, I forgot that the functions should've returned the player and not the entity handle :/
Also fixed the ESX.Game.GetClosestPed() function just returning your own ped.
Thanks @SSNRSS for helping me iron out the problems!
Co-Authored-By: Lucas. <ssnrss@users.noreply.github.com>
This changes arguments on the following functions:
- ESX.Game.GetClosestObject()
- ESX.Game.GetPeds(), no more arg for ignoreList
- ESX.Game.GetClosestPed(), no longer a ignore list, instead a whitelist
Added flash and saveToBreif booleans to ESX.ShowNotification() and ESX.ShowHelpNotification()
Added two optional booleans thisFrame, beep to ShowHelpNotification() and last new optional argument duration
- Pickups now require you to press E once nearby to pick up
- Fixed pickup objects sometimes not showing up #420
- Added animation to picking up and throwing items
- Added message when inventory cannot accept picking up item
- Fixed#256
- Implements #173
__NO OFFICIAL ESX SCRIPT WILL WORK WITH THIS AT THE MOMENT__
This commit will break your entire ESX if you dont use the new SQL format, follow the new one if you want it all to work properly.
Scripts using `item.limit` will break too, instead use `xPlayer.canCarryItem(item, count)`
Fixed the "health" problems on vehicles. It seems like you shouldn't use the `GetEntityHealth()` on vehicles at all since it is linked to the `GetVehicleBodyHealth()` native.
But if you use the `SetEntityHealth()` native on an vehicle it breaks the link. Instead there's both body health and engine health that ESX has missed out on.
Since the new used `GetVehicle***` natives return decimal values we round them to 1 decmial.
Also dirt levels are now rounded to one decimal since they make 0 visable difference.