Commit Graph

133 Commits

Author SHA1 Message Date
Joel 3c9ce7cc4c fix: append source id when registering client callback in table to prevent collisions 2025-10-06 13:41:12 -04:00
MrNewb d19f34ba09 update 2025-06-22 15:45:03 -04:00
Kakarot 2827a6350b Merge branch 'main' into main 2025-06-22 14:38:43 -05:00
MrNewb 7a0567efac feat(core): add functions to retrieve online players by job name or type with optional on-duty check
Adds two utility functions to retrieve online players by either job name or job type, with optional filtering for on-duty status. While the logic is a bit nested, this approach avoids unnecessary function splitting and keeps related behavior in a single place. Although I'm not entirely satisfied with the nesting, this structure felt like a reasonable trade-off between readability and reusability.

This method could also serve as a foundation for deprecating older job-check functions, should the maintainer choose to consolidate similar logic in the future.
2025-05-23 04:13:17 -04:00
Stevie 76dcd087df Update functions.lua 2025-04-11 04:26:31 +01:00
Stevie eabfb14086 Update functions.lua 2025-04-11 04:24:56 +01:00
Stevie d293239c71 Update functions.lua 2025-04-11 04:23:35 +01:00
Stevie 85bc71416a Update functions.lua 2025-04-11 03:44:55 +01:00
Kakarot 73e80fbc7c Merge branch 'main' into main 2025-03-09 14:23:30 -05:00
Miguel Oppermann 62e6a6f949 Update functions.lua
Fixed a bug that prevented paychecks from working forever once 0 players was hit which typically directly happens on server start.
2025-03-02 00:42:27 +01:00
Pickle 1ce2d445ee Merge branch 'main' into main 2025-02-02 21:28:02 -05:00
Kakarot 9adb33b970 Core object filtering + exported functions/data
Maintains backwards compatibility and allows users to only get what they need from the core instead of importing it all
2025-01-25 00:36:31 -06:00
Pickle ebae2c35f7 Update functions.lua 2025-01-12 14:13:07 -05:00
Zerio d08d7bbeba chore: remove accidental automatic format changes 2025-01-07 07:21:50 +01:00
Zerio 8ab5f76bdf feat: simply funcref check 2025-01-07 07:20:53 +01:00
Zerio 8660c98d49 fix: wrong args passed 2025-01-06 21:41:53 +01:00
Zerio dc8fbf04e9 feat: use promises in callbacks + cleanup 2025-01-06 21:31:23 +01:00
Zerio c4bbff6b56 Merge branch 'main' into main 2024-07-15 04:55:14 +02:00
Kasey FItton e1aa208b61 fix(server/functions): return database details correctly 2024-07-12 01:06:48 +01:00
Kasey FItton e39fe89140 feat(server): SQL error handling 2024-07-11 18:53:27 +01:00
Zerio 9fbab7a4e6 fix: remove usable item after resource stop 2024-05-25 21:04:30 +00:00
Kakarot d479831d0d server functions 2024-05-23 02:39:29 -05:00
Kakarot 435c5335a3 Inventory Update 2024-05-20 05:28:38 -05:00
EinS4ckZwiebeln 868600197d Optimizations 2024-03-28 12:56:32 +01:00
FjamZoo d7cc3b5884 Feat: Add statebag for instances 2024-01-30 04:41:07 +01:00
Kakarot 554ae36ec1 Update export 2023-11-23 11:12:34 -06:00
Kakarot d7323ba147 fxdk handling + naming + duplicate license 2023-11-13 03:28:14 -06:00
Kakarot 27e4d82b28 Merge pull request #1031 from Swellington-Soares/main
refactor: update GetIdentifier to use new native
2023-11-09 21:29:54 -05:00
Kakarot a73e878487 Weapon attachment rework 2023-11-03 09:40:35 -05:00
Swellington Soares de1931911d refactor: update GetIdentifier to use new native 2023-10-28 03:51:39 -03:00
Kakarot f3578b2945 Merge branch 'main' into main 2023-09-23 15:10:51 -05:00
Swellington Soares f93c31fa54 Update functions.lua
Added functions to Get players by account and added functions by char info passing the key property and value to check if exists.
2023-09-20 17:02:43 -03:00
Daniel GP b156f5c658 Add GetPlayerByLicense function 2023-05-15 22:26:06 +02:00
Kakarot 56d74f6405 New function for server vehicle spawning 2023-04-27 22:06:05 -05:00
Kakarot 414f946688 Merge branch 'main' into main 2023-04-27 15:46:47 -07:00
erikmeyer08 822b2e4187 Add pacycheck reason
Adds the string 'paycheck' for AddMoney function 'reason' variable.
2023-04-14 20:06:09 -04:00
tom-osborne 5feec5582b correct use of "or nil" 2023-03-02 07:28:25 +00:00
tom-osborne 7620c1c74a Add documentation (luadoc) to functions 2023-03-01 23:47:21 +00:00
R0adRa93 01e8597f07 [FIX] Security match sql (#925)
* Added PrepForSQL function

performs a check to a string with expected patterns to be matched.

* Bug Fixes

After talking with Stan I realized that it wasn't testing strings so I set it up to ensure data is a string.

I also reworded the event log.
2023-01-18 18:53:38 +01:00
R0adRa93 9878aeaeb2 Added PrepForSQL function (#914)
performs a check to a string with expected patterns to be matched.
2023-01-17 16:01:36 +01:00
Linden bc7555a49c refactor(server/functions): grant principal to player.id
Easier to read and test aces.
2022-09-01 07:32:00 +10:00
BerkieBb 8557e599f0 tweak(server/functions): usableitems are back in the core 2022-08-25 17:42:55 +02:00
Spudgun c61d0b204e tweak: HasPermissions accept both string and table
Enables single and multiple permission checks
2022-08-24 18:57:53 +12:00
BerkieBb 6231dbab6a feat(server/functions): usable item exports 2022-08-20 09:36:08 +02:00
Kakarot 8fffc421bb Merge Dev (#794)
* [Update] Stuff and Things - Fix Exploit

- Update doors on teleport so they don't get stuck (requires my doorlock PR that creates a updateDoors() export
- Support for heading with TeleportToCoords event
- Support for teleporting to location name with /tp and a default file with locations to use
- Remove 'QBCore:Server:AddItem' event (requires PR to other resources that use it)
- Support for an array of items that do the same thing with QBCore.Functions.CreateUsableItem
- Player exists check before removing or adding permission
- Trigger OnPlayerUnload as a server side event too
- Player.Functions.GetMetaData function
- Added reason to money remove logs
- Set dirt level to 0 on /car vehicles

* Export to Event

* Deprecate instead of remove?

* Player+License verification fix

* Update events.lua

* Export change for qb-management

* [Hotfix] Errors after Merge

* [Change] src to source

* Prevent people using /me to troll

This prevents people using that /me troll with the huge font size and different colors.

* Remove DoorUpdate event

* Update client/events.lua

Co-authored-by: BerkieBb <82737367+BerkieBb@users.noreply.github.com>

* Update server/functions.lua

Co-authored-by: BerkieBb <82737367+BerkieBb@users.noreply.github.com>

* Adjustments for BB

* Linting

* fix(server/functions): use indexed variables

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): remove unnecessary _

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): remove unnecessary _'s

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/player): indentation

Co-authored-by: David Malchin <malchin459@gmail.com>

* [Chore] Remove Money

Removed repetitive code that made zero sense

* Update en.lua

* Update player.lua

* Update player.lua

* Update functions.lua

Co-authored-by: ItsANoBrainer <itsanobrainergg@protonmail.com>
Co-authored-by: Scullyy <51968381+Scullyy@users.noreply.github.com>
Co-authored-by: Idris Dev <IdrisDose@users.noreply.github.com>
Co-authored-by: Idris <idrisdev@gmail.com>
Co-authored-by: BerkieBb <82737367+BerkieBb@users.noreply.github.com>
Co-authored-by: David Malchin <malchin459@gmail.com>
Co-authored-by: Chris Usiak <christopher.usiak@oakland.k12.mi.us>
2022-08-19 11:48:39 -05:00
BerkieBb d88e51ee4f Remove inventory code from the core (#784)
* tweak(config): remove inventory code

* tweak(client/functions): remove inventory code

* cleanup(server/commands): remove inventory command

* cleanup(server/events): remove hasitem callback

* cleanup(server/functions): remove inventory code

* cleanup(server/player): remove inventory code

* feat(server/player): QBCore:Player:SetPlayerData server side

Removed QBCore:Server:PlayerLoaded for PR that will be merged before me that adds it

* feat(server/player): QBCore:Server:OnGangUpdate

* fix(shared/items): remove duplicate snowball

* fix(server/events): warn for exploitable event

* fix(server/functions): startup error

* feat(server/player): some backwards compatibility

* fix(server/events): warn for exploitable event

* feat(server/player): Player.Functions.AddField

* feat(server/exports): SetField and AddField

* fix(server/player): inventory state check
2022-08-19 11:33:38 -05:00
BerkieBb dc087a976c feat(server/functions): QBCore.Functions.Notify (#772)
Co-authored-by: Stan <96954031+tom-osborne@users.noreply.github.com>
2022-08-04 13:25:23 +03:00
Kakarot 6c27291366 Spawning fixes 2022-08-03 20:40:34 -05:00
BerkieBb be6c6211dd tweak(server/functions): use joaat (#768) 2022-07-27 13:36:40 +03:00
BerkieBb 827819d002 Fix optin toggle and add SetPlayerData function to player object (#757)
* feat(server/player): SetPlayerData

* fix(server/functions): toggling optin
2022-07-27 11:07:04 +03:00