Commit Graph

58 Commits

Author SHA1 Message Date
Linden a4f4da621f feat(legacy/multichar): Added support for esx_multicharacter; applied minor changes to spawning 2021-05-17 20:33:25 +10:00
Jérémie N'gadi 947f2184ff Revert "pt-PT Translation pt.lua" 2020-05-15 18:21:28 +02:00
Jérémie N'gadi 5a21e759a9 Merge pull request #737 from ESX-Org/develop
pt-PT Translation pt.lua
2020-05-15 18:16:58 +02:00
heyheyitsmeman eab23417a5 Update player.lua 2020-05-15 17:02:35 +03:00
Jérémie N'gadi ff8625cb32 Now we can extend xPlayer without touching core files 2020-05-13 21:04:06 +02:00
p-josue e7978c2380 Add maxCarryItem function
A function that returns the max number of item that this player can carry
2020-05-11 18:08:25 +02:00
Andrea Passarini 9f1a18d420 Fix removeWeaponComponent not working correctly 2020-04-07 04:43:24 +02:00
ElPumpo 9a1dfa42ca Sync consumed ammo with server properly
No more security issues here!
2020-03-22 09:43:43 +01:00
ElPumpo ff9930068f Keep weight stored 2020-03-15 12:20:08 +01:00
MohamedAmrMahdy e712c0158d Add xPlayer.getMaxWeight() (#559)
* Add xPlayer.getMaxWeight()

Add ability to read current maximum weight for player

* Remove the tab indent
2020-03-11 09:53:57 +01:00
ElPumpo 3ba2ed150f Save accounts as encoded json text, migrate script found in development discord 2020-03-06 20:41:37 +01:00
ElPumpo a2308dec59 Implemented starting balance, closes #537 2020-03-04 13:01:46 +01:00
ElPumpo c4655598f9 Removed ES leftover code 2020-03-04 11:28:34 +01:00
ElPumpo 4d9af4e1ab Improved saving loadouts (see desc)
- Only save weapon components if needed, wont save default clip anymore, and if no other component is available then its not saved at all

- Tint index not stored if not above 0
- Weapon label not saved in database since its useless
- Validate weapon on player load
2020-03-01 10:54:03 +01:00
ElPumpo 24a9defca4 Removed xPlayer.removeWeapon() second argument 2020-02-25 15:54:38 +01:00
ElPumpo 35a726685e ⚠️⚠️BREAKING COMMIT⚠️⚠️: Complete ES ditch 2020-02-17 15:22:09 +01:00
ElPumpo f236a67d63 Implemented json encoded inventory, closes #177 2020-02-12 12:33:14 +01:00
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