Commit Graph
100 Commits
Author SHA1 Message Date
Jim Shield f069db5c61 Update QBInv stash retrieval
Now uses GetInventory to grab the stash from its cache instead of directly from database

Also fixes old qb inv support for stash retrieval
2025-05-07 16:36:18 +01:00
Jim Shield 3b768d5c7d update isStarted() fuction
Add fallback for if somehow the script name being checked was sent as `nil`, if `nil` it returns false
2025-05-07 13:56:26 +01:00
Jim Shield 6b8698353b Expand on the core file loading system
This is still not in use for now, but it WILL be used in the future

I'm getting too many support tickets about the "Failed to load" warning in console about files they don't have/need
(if you don't run `ox_core` don't worry about `ox_core` not loading)

This system is intended to load it through the script instead of `fxmanifest.lua`

It is intended to check if the user has the required script and also warn them if it's not started (load order issue), or just load it as if it were told to in the fxmanifest
2025-05-07 13:55:12 +01:00
Jim Shield 5868312388 fix ps-inv/lj-inv check
If you didn't have either PS-Inventory or LJ-Inventory, this ended up breaking loading as it ended up checking is `nil` was started
2025-05-07 13:32:54 +01:00
Jim Shield b0b139b179 Rework ps-inventory support
PS-Inv used to be exactly the same as QB-Inv so alot of the function calls were shared

This separates them and makes it easier to make changes to support their inventory

Also unified the calls for server side functions into single functions instead of having separate per inventory

Also moves:
- `invImg()` to inventories.lua
- `registerStash()` to stashcontrol.lua
2025-05-07 12:58:39 +01:00
Jim Shield 4bf4806b9e workaround for a prop claiming it couldn't find W
this is just a quick workaround, if a prop is created without a heading, it auto sets it to 0
2025-05-07 12:54:23 +01:00
Jim Shield 826e745fc3 fallback for the fallback
Not having the server convars added to the server.cfg was causing issues for some users

it should have worked, but this forces things to gta if you don't have any values set for them anywhere

I've added fallbacks to "gta" settings to hopefully stop fivem errors
2025-05-07 01:59:03 +01:00
Jim Shield bc2867984c Version Bump
`2.0.05` - `2.0.06`
2025-05-06 10:53:34 +01:00
Jim Shield 31633bc61d crafting exploit fixes
This has several changes

When crafting, it now checks if the inventory is open and stops crafting dead and warns the player with a print.

Multicraft now checks if you have space in your inventory for the items and limits the max amount craftable

Also fixes the "title" of the qb-input box when crafting

Also changed the anim flag for the "placing items" to hopefully keep you in place
2025-05-06 00:17:07 +01:00
Jim Shield 1623feacf1 fix multicraft for qb-input side
I forgot to correct the result as qb-input returns strings, this fixes that

Also added a fallback for if the user deletes the value and tries to craft `nil`
2025-05-05 22:52:46 +01:00
Jim Shield a203657e2a Add event to clear AuthEvent for player
When a player logs out and back in (switches character) it was thinking that the `AuthEvent` was being called more than once, triggering a warning message

This should clear the event when a player unloads and then allows them to request a new one
2025-05-05 20:01:15 +01:00
Jim Shield 1f4a2ee3d9 refactor checkStashItem()
This'll probably break it, (it works for me) but refactored the stash item check, it was calling `stashHasItem()` for every ingredient check, now it sends the whole table of ingredients per item to craft and checks them together instead of separately

Also removes a `Wait()`, as it shouldn't need it with this change..maybe
2025-05-05 12:28:30 +01:00
Jim Shield e9c54cbdd4 multiCraft() refactor
An attempt to speed up `multiCraft()` function creation logic

Before it created a table of items while it was trying to check them I've separated this so it just gets that out of the way and checks items in it's own `for` loop

Also added a `maxCreation` variable that users can edit if needed which decides how many of an item can be created (I'll change this soon probably to tie into the config options in scripts for multicraft again soon

Also removed a few `Wait()`s that were there to help it not get confused, but after testing I believe this didn't make a difference, let me know if there's any issues with stuff like it saying it can craft when you dont have the items
2025-05-05 12:24:38 +01:00
Jim Shield 4e8a15590f make a checkToken() event its own function
Several events were calling very similar check token events, so I've just moved them to one to help unify it and help future debugging
2025-05-05 11:44:51 +01:00
Jim Shield c745d51832 Fix up dupwarn and additem auth messages
Forgot to update this, now prints an optional message if available

and made dupeWarn kick message less specific
2025-05-04 20:33:51 +01:00
Jim Shield f9b97b7505 Version bump 2.0.05 2025-05-04 16:24:55 +01:00
Jim Shield 489da64c5e add a new warning for token auth 2025-05-04 15:40:20 +01:00
Jim Shield 07c35cd917 workaround for ox_inventory returning a bool
I think, if ox_inventory checks a stash that doesn't exist yet, it returns a boolean or `nil`

This checks for that and instead returns a table to hopefully stop the scripts from breaking
2025-05-04 15:21:02 +01:00
Jim Shield 3f72a21d75 Update bigMessageInstance.lua 2025-05-03 20:28:13 +01:00
Jim Shield 4ad6170a49 Fix ox_target items variable
Completely overlooked that ox_target item variable is `items` not `item`

changes
```lua
                item = opts[i].item or nil,
```
to:
```lua
                items = opts[i].item or nil,
```
2025-05-03 00:11:28 +01:00
Jim Shield 18df0817b1 Make version checks a bit more obvious
Adds more obvious prints if the current version is outdated

(and also repeats it every 20 minutes)
2025-05-02 22:22:47 +01:00
Jim Shield 0eca7ae29e Fix CodeM item slot check for metadata function
The slot data for CodeM apparently returns as a string, this fixes it trying to compare a string to a number

```lua
            if v.name == item and v.slot <= lowestSlot then
```
to
```lua
            if v.name == item and tonumber(v.slot) <= lowestSlot then
```
2025-05-02 22:20:26 +01:00
Jim Shield 6a5913230f Add better fallbacks for if no metadata table is found
```lua
                durability = v.info.durability
```
to:
```lua
                durability = v.info and v.info.durability or nil
```
2025-05-02 22:16:51 +01:00
Jim Shield b7a284e051 Fix new duty sync
This should have been placed in a `onPlayerLoaded()` but it was checking at script start for player info before that info was able to be grabbed
2025-05-02 12:29:02 +01:00
Jim Shield 0accdda2dd version bump
`2.0.04`
2025-05-02 11:36:54 +01:00
Jim Shield 37b855d7a7 Better syncing of onDuty variable
Added a check to the script start to get the current players duty (helpful if yours saves the duty through restarts)

Also added core specific triggers for job/duty changes to help keep these in sync
2025-05-02 11:20:09 +01:00
Jim Shield 7432dd5118 revert qbinv dectetion
Wasn't playing as well as I thought it would..
2025-05-01 20:05:00 +01:00
Jim Shield 59ff34c9cc Add exploit protection for :Crafting:GetItem
I unfortunately forgot to add this before when adding the extra exploit protection. Now demands an auth token before allowing crafting results to help reduce exploiters calling it externally
2025-05-01 18:07:39 +01:00
Jim Shield b81ada265b Better support for RedM's RSG Core
Nothing public uses this yet, but its very similar to QBCore which makes it very for me to support

Nothing special to note, just improves the integration for future ventures into RedM
2025-05-01 17:49:37 +01:00
Jim Shield 65c9c6c586 Add automated check for QBInv version
Currently if you still have the old qb-inventory or a css edit it would require you to manually edit the starter.lua
```lua
QBInvNew = true
```

I'm testing a change to grab the version and return true of false if its above `2.0.0` (200)
```lua
local qbInvVer = GetResourceMetadata(Exports.QBInv, 'version', nil):gsub("%.", "")
QBInvNew = tonumber(qbInvVer) >= 200
```
If this causes issue's I'll revert this
2025-05-01 17:08:21 +01:00
Jim Shield 278cbb4d34 fix discord bot yml 2025-05-01 13:36:44 +01:00
Jim Shield 381c19e701 add gitbot yml 2025-05-01 00:20:35 +01:00
Jim Shield fc2ebefc9e fix CodeM server side inventory info grab 2025-04-30 17:54:04 +01:00
Jim Shield 423b75e7d9 Tgiann Inv support added 2025-04-30 17:53:26 +01:00
Jim Shield e984a437df attempt to fix shops for QS-Inv 2025-04-30 16:54:33 +01:00
Jim Shield 0818dae0df change qs-inv metadata call to info 2025-04-30 13:21:39 +01:00
Jim Shield 771a2a3217 fix quasar crafting stash item removal 2025-04-29 23:26:10 +01:00
Jim Shield 04b3f87b32 change CodeM metadata check to info 2025-04-29 19:55:30 +01:00
Jim Shield 6c3d0ffc5e change CodeM client inv check to getUserInventory() 2025-04-29 19:55:09 +01:00
Jim Shield 3f093ce934 fix QS-Inv registerStash function 2025-04-29 17:43:37 +01:00
Jim Shield 9a47ec59b0 bump fxmanifest version 2025-04-29 17:24:20 +01:00
Jim Shield 69ce8d9225 remove nui from jim_bridge, i think its killing things 2025-04-29 17:23:28 +01:00
Jim Shield 93b884de01 Bump to 2.0.01 2025-04-29 12:31:05 +01:00
Jim Shield a308f82be9 version bump 2025-04-29 12:27:00 +01:00
Jim Shield b3100a336c possible fix for lib error 2025-04-29 12:26:49 +01:00
Jim Shield 8f7f9bb009 force stash to a table when removing items 2025-04-29 02:37:47 +01:00
Jim Shield 25dadae446 Merge pull request #41 from jimathy/1.2 2025-04-28 18:19:38 +01:00
Jim Shield 1d588c4f41 Add a complete readme with documentation 2025-04-22 19:17:34 +01:00
Jim Shield ac58fe4bb7 Fix and enhance update checker 2025-04-22 19:17:03 +01:00
Jim Shield 45c5af8e81 Fix duplicate functions and typos 2025-04-22 19:16:31 +01:00
Jim Shield 673d9e3a12 fix alt forcing nui focus 2025-04-20 23:44:09 +01:00
Jim Shield 738e11c8e3 Add support for built in nui menu 2025-04-20 19:17:40 +01:00
Jim Shield 842379e8f9 Add override convar checks 2025-04-20 19:17:16 +01:00
Jim Shield d1bb796d5f implement inbuilt nui menu 2025-04-20 01:22:32 +01:00
Jim Shield b7db98ffdc esx fixes 2025-04-18 19:45:56 +01:00
Jim Shield 6ce6770df4 add checks for if MySQL has loaded for ESX 2025-04-18 16:14:42 +01:00
Jim Shield 56ef3b75b2 Fix change dui functions 2025-04-14 21:58:38 +01:00
Jim Shield bd1be5e953 add function to get animal anim table for that ped 2025-04-13 19:07:02 +01:00
Jim Shield 8f72968e76 Create FUNDING.yml 2025-04-13 13:26:09 +01:00
Jim Shield b27f91ac87 fix playerdata check for isDead in server 2025-04-12 01:09:21 +01:00
Jim Shield 35357c07a3 add isDead and isDown to getPlayer() 2025-04-12 00:19:22 +01:00
Jim Shield 943436467e add ox checkbox option for input 2025-04-12 00:18:48 +01:00
Jim Shield 747fd272d4 fix bigmessage scaleform being local 2025-04-12 00:17:47 +01:00
Jim Shield 3ec00956df Enhance drawtext feature 2025-04-08 17:51:30 +01:00
Jim Shield 1248102635 Add more support for RedM RSGInv 2025-04-08 17:48:38 +01:00
Jim Shield 2be706a860 hopefully fix esx loading 2025-04-08 17:47:12 +01:00
Jim Shield 2da2c56705 add basic support for RedM (RSGCore) 2025-04-07 20:52:59 +01:00
Jim Shield 4d8305c844 changes for beta branch 2025-04-01 14:15:50 +01:00
Jim Shield 8611bc6d3c I am still alive 2025-03-26 21:43:48 +00:00
Jim Shield 2572f86030 input compat fixes 2025-03-11 22:41:13 +00:00
Jim Shield 83ba74bc12 fixes 2025-03-08 20:55:05 +00:00
Jim Shield 6bfb549fd0 refactor + attempt better support for other inventories 2025-03-08 13:44:05 +00:00
Jim Shield 31a7ac2951 general fixes and updates 2025-03-07 13:32:10 +00:00
Jim Shield 1cb2bdb525 fixes for jim-crafting changes 2025-03-07 13:30:17 +00:00
Jim Shield daa9dca142 fix createCallback complaining on client side 2025-03-07 13:29:43 +00:00
Jim Shield c947993e9e Add multiscript banking functions 2025-03-07 13:27:47 +00:00
Jim Shield 8dd2b7ae9a Beta: Fixes for existing scripts + feature for jim-crafting 2025-03-06 23:49:07 +00:00
Jim Shield 8eb98bff29 (Beta) Fixes for multiframework support 2025-03-01 12:58:43 +00:00
Jim Shield f9812a689e Add files via upload 2025-02-22 13:21:54 +00:00
Jim Shield e72fad0bfa Upload beta 1.2 2025-02-21 13:47:15 +00:00
Jim Shield 61a582a330 Remove old files 2025-02-21 13:45:08 +00:00
Jim Shield 80c357986d Merge pull request #22 from jimathy/1.0.13
1.0.14
2024-02-25 11:49:30 +00:00
Jim Shield 6c2b0b487f Merge branch 'main' into 1.0.13 2024-02-25 11:49:13 +00:00
Jim Shield ad3d2b534f update version.txt to 14 2024-02-23 15:51:52 +00:00
Jim Shield a4e9333ab8 1.0.14 2024-02-23 15:47:08 +00:00
Jim Shield e08b349e31 Version Bump 2024-02-20 12:44:25 +00:00
Jim Shield 2bf7a28508 fix typo 2024-02-20 12:43:51 +00:00
Jim Shield e6bee2ae2e dui request callback 2024-02-19 17:57:51 +00:00
Jim Shield fc832d73f9 dui request callback 2024-02-19 17:57:15 +00:00
Jim Shield e8e9b53f53 port dui texture changes (needs mutliscripting) 2024-02-19 17:53:23 +00:00
Jim Shield 7304376e90 getDurability updates 2024-02-19 17:52:19 +00:00
Jim Shield 7e9914afda grav inv fixes 2024-02-19 17:50:19 +00:00
Jim Shield 89f6f6deb0 add jpr-phonesystem support 2024-02-16 22:45:22 +00:00
Jim Shield faa4a123fd Merge pull request #21 from SirOMGitsYOU/patch-2
add jpr-phonesystem support
2024-02-16 22:45:07 +00:00
Jim Shield f1ae24d0fe separate create dui event 2024-02-16 22:42:13 +00:00
Jim Shield 4848b51ecc Update README.md 2024-02-14 17:34:04 +00:00
Jim Shield 2aa0cc9d5d Start adding manual durability changes 2024-02-14 00:19:36 +00:00
Jim Shield 5e3ace804d Adjust ox/qb target name creation 2024-02-14 00:11:08 +00:00
Jim Shield 42b109a5f1 readability 2024-02-09 17:02:45 +00:00
Jim Shield 5a8afb516b Update README.md 2024-02-09 16:51:20 +00:00