- Implemented two new xPlayer functions:
- .getWeaponTint(weaponName)
- .setWeaponTint(weaponName, weaponTintIndex)
Thanks to @profex1999 for co authoring this!
Co-Authored-By: Andrea Passarini <profex1999@users.noreply.github.com>
- Removed xPlayer .displayBank()
- Fixed issues with giving weapon using commands
- Modified ESX.UI.ShowInventoryItemNotification() to take string instead of table
- Minor adjustments and variable renames
- Fixed lower case weapons not droppable
- Removed /disconnect command becasue fivem implemented their own
This commit implements a new way of saving and getting player coords.
Player coords are synced with its assigned xPlayer, the syncing interval is defined in the configuration file.
Also coords wont sync if the player is too close to their previous location.
Existing servers must change their database to account for the new length of the position varchar, at 53 chars max. There's also a column default value specified in the sql file.
New xPlayer functions:
- .getCoords()
- .setCoords() (x,y,z,heading (optional) table
- .updateCoords()
The last one is used for syncing coords from client (interval). The second one will teleport the player. First one is a renamed .getLastPosition()
- 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)`
- proper i18n strings for dropping accounts, money, standard and weapons
- check if the player has the weapon
- workaround for duplicating weapon ammo when dropping weapon with 0 ammo
- removed throw delay
- code cleanup
- /giveweapon now takes ammo as an argument
- improved Swedish translation
- hide actions in the inventory menu if they cannot be done.
- general code improvements, cleanup