Commit Graph

41 Commits

Author SHA1 Message Date
ElPumpo baa9ca3afc Implemented weapon tint support (desc), closes #477
- 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>
2020-02-11 21:11:54 +01:00
ElPumpo cd1ce6a849 Don't parse item object to client, added weapon component notifications (more see desc)
- 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
2020-01-20 14:33:24 +01:00
ElPumpo cced6c955e Removed xPlayer .setBankBalance(), .getBank(), .setSessionVar(), .getSessionVar(), .getPermissions(), .setPermissions() 2020-01-19 22:59:26 +01:00
ElPumpo a109701253 removed xPlayer .addBank() and .removeBank()
Phasing out ES code, and those functions were misleading
2020-01-19 22:54:45 +01:00
ElPumpo 60fd7e317b Added optional notification background color arugment
Co-Authored-By: WolfShy1 <wolfshy1@users.noreply.github.com>
2020-01-15 12:18:39 +01:00
ElPumpo 1d83a1f2f4 Updated native names, added optional values (read desc)
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
2020-01-15 11:54:19 +01:00
ElPumpo f89e051756 BREAKING COMMIT - Player loading improvements (read description!)
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()
2020-01-12 22:13:30 +01:00
ElPumpo 2140f8628c Added log level to print uses, and change formatting 2020-01-03 13:55:23 +01:00
ElPumpo 2d80e55631 rename _source variable to playerId 2019-12-27 13:49:40 +01:00
ElPumpo aad435842b Update player.lua 2019-12-27 13:47:18 +01:00
ElPumpo f9afa6f017 player.lua: implement canSwapItem() and triggerEvent() 2019-12-27 13:45:53 +01:00
ElPumpo f0130e8f38 player.lua: test nil values 2019-12-27 13:39:31 +01:00
ElPumpo 145f8ebe75 Breaking changes: implemented global weight inventory system, read description before updating!
- 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)`
2019-10-13 20:56:09 +02:00
ElPumpo 32e6c7edc2 Added optional xPlayer.getCoords() argument to return vector3 type 2019-10-13 16:39:29 +02:00
ElPumpo 546ac33b1a Added xPlayer .showNotification() and .showHelpNotification() 2019-10-06 20:29:56 +02:00
ElPumpo 8a7cf56497 xPlayer.getCoords() round to one decimal from ES 2019-09-29 11:30:42 +02:00
ElPumpo adfb9f6522 Fixed xplayer typo 2019-08-04 17:54:18 +02:00
ElPumpo 06d3ee286f Replaced for i= loops with ipairs 2019-08-04 14:55:04 +02:00
DanishRP 36bc96cdfe Changed Variables
Changed Variables for self.removeAccountMoney, did not match same scheme as other functions in same function
2019-05-11 01:18:59 +02:00
ElPumpo cd9383a56f Grade supposed to be number type 2019-03-06 22:50:43 +01:00
ElPumpo b8d0669b64 Fixed job issues and dont query sql on xPlayer creation 2019-03-04 21:21:18 +01:00
ElPumpo e976de722b Implemented xPlayer.setLastPosition and fixed saving coords 2019-02-28 12:59:44 +01:00
ElPumpo 9a39f83aee Minor changes 2019-02-28 12:57:54 +01:00
ElPumpo 5ab6123b44 Implemented ESX.DoesJobExist() 2019-02-28 12:57:09 +01:00
ElPumpo 1a2c52bc83 Check if last position exists 2019-01-03 14:19:18 +01:00
ElPumpo 79c626aa9a Fixed removing weapon 2019-01-03 13:32:29 +01:00
ElPumpo 28d1ebe9d9 Fixed problems with /clearloadout 2019-01-02 12:51:18 +01:00
ElPumpo b1d58d2abd Removed some never used streaming helpers 2019-01-01 11:03:02 +01:00
ElPumpo 22a4d67971 Fix new player error on first spawn 2018-12-31 14:11:05 +01:00
ElPumpo e0f9358b22 Only add weapon component once, check if player has weapon 2018-12-29 13:47:01 +01:00
ElPumpo caec057954 Initial support for weapon components 2018-12-29 02:10:37 +01:00
ElPumpo b63c147fc0 Proper raycast arguments, trim last position 2018-12-23 15:05:00 +01:00
ElPumpo 3fc17880f8 Added ESX.Math.Trim function 2018-11-20 21:03:44 +01:00
ElPumpo a4152db8c3 xPlayer.hasWeapon() function 2018-11-11 11:52:16 +01:00
ElPumpo bac7be4f6b Added setName() to xPlayer class 2018-11-10 10:38:00 +01:00
ElPumpo 810949fe09 Performance improvements 2018-09-20 22:45:00 +02:00
ElPumpo c07cdde7c8 Tab indent update 2018-09-01 17:43:35 +02:00
ElPumpo 3de26d020b Improved ammo handling 2018-06-22 22:25:34 +02:00
ElPumpo 0edf413a99 Exploit fixed: money negative values 2018-04-28 11:34:25 +02:00
KandaSoranyan eb42f346b2 Add files via upload 2018-02-19 03:30:02 +01:00
Jérémie N'gadi 97adf4f97c build(submodules): Remove submodules + move everything at root 2017-09-15 14:26:56 +02:00