#UTILITIES HELPER RESOURCE

1 messages · Page 1 of 1 (latest)

fast yacht
#

Long story short I am currently working on a rather large utility helper resource to just general save a bunch of time with future coding.

I'll be keeping this standalone just to cover mostly boiler plate code, however may add a framework section into also if theres some relevant code sections that would benefit from being in here.

Putting this up to see if you folks have any suggestions for this?
Literally anything you type repeatedly and it gets annoying, or any requests for just some custom functions you think might help out with development etc etc.

Worlds your oyster here..

I think the resource is currently at close to maybe 150+ helper functions so far haven't counted have attached a link to the new docs for this, have added everything thats in there so far.

https://docs.boii.dev/fivem/free-resources/boii_utils

Here you can learn all about the boii_utils resource.

oblique spindle
#
  • Notify System
  • Dispatch system (s) (maybe a few different types of dispatch, depending on circumstances etc
  • Framework name ? possible
  • Vehicle Key system
  • Fuel System
fast yacht
oblique spindle
fast yacht
#

So couple things im thinking right now is

Client:

  • add in the current progress on target maybe to keep it in one location
  • polyzone stuff
  • weather + time etc

Server:

  • some sql helper functions
  • syncs for the client side stuff etc
#

Pretty much just trying to think of a lot of stuff I either have to use over and over and then build some custom functions to help deal with some larger data for specific things etc

oblique spindle
#

hmm! good idea, might even be worth having like an editable progress bar function, that can have variables in it, saves writing it out everytime, if you are a scripter 😄

fast yacht
#

yh im currently 50/50 on to add in some ui stuff into this or just keep it as the 2 current resources so ui and utils, but have been thinking about potentially splitting it and moving the minigames out of the ui resource into its own since they are a little more involved than the general ui stuff

oblique spindle
#

Yeah, that does sounds good! and maybe an option, that if not using boii-core, it turns off things that are not needed 😄

fast yacht
#

I'll be getting back on this in about an hour or so anyway will get some server stuff done and get a 0.0.1 out so people can see whats in there a little easier than browsing docs etc and can just constantly improve on it then with whatevers needed

fast yacht
fast yacht
fast yacht
#

most likely going to sleep tho now since 5am.. maybe..

wary mauve
fast yacht
#

Ah yeh sure i didnt think of that tbh I tend not to really use server side peds myself, but they can be handy from time to time.

Pretty much just about dragged my lazy self out of bed so will get on some of this stuff later, is sunday anyway so not doing anything major today

wary mauve
fast yacht
#

yh i usually run restricted with some simple enumerators to yeet whatevers not wanted personally, each to their own tho either way works

fast yacht
#

done a semi indepth wrapper for mysql-async, ghmattimysql, oxmysql and left some space for a custom one for whatever people need, and added in a couple custom functions to cover some of stuff i use quite often etc.
really cba updating the gitbook right now tho ill do it later

#

is here atm anyway if theres any other common sql things hmu

fast yacht
#

added a new function get bucket settings and add some settings to a bucket, currently use attached coords to buckets in boii_base for spawns etc so thought id update here too

-- Function to set a player into a bucket with params
-- Usage: 
-- utils.buckets.set_player_bucket(player_id, {
--     bucket_id = 1,
--     enable_population = true,
--     lockdown_mode = "strict",
--     max_players = 30,
--     spawn_coords = vector4(0.0, 0.0, 0.0, 0.0)
-- })
local function set_player_bucket(player_id, params)
    SetPlayerRoutingBucket(player_id, params.bucket_id)
    if params.enable_population ~= nil then
        SetRoutingBucketPopulationEnabled(params.bucket_id, params.enable_population)
    end
    if params.lockdown_mode then
        SetRoutingBucketEntityLockdownMode(params.bucket_id, params.lockdown_mode)
    end
    bucket_settings[params.bucket_id] = {
        max_players = params.max_players,
        spawn_coords = params.spawn_coords
    }
end

-- Function to get settings for a specific bucket
-- Usage: local settings = utils.buckets.get_bucket_settings(bucket_id)
local function get_bucket_settings(bucket_id)
    return bucket_settings[bucket_id] or {}
end
``` is the new code untested atm but should all work ![facepalm](https://cdn.discordapp.com/emojis/762315181808025670.webp?size=128 "facepalm")
fast yacht
#

just working through now testing a load of stuff all blip stuff is working to create, update, toggle on/off for all or by category etc etc and the dev stuff is working other than weather types and ped model -.- will sort those in a min and make some adjustments to the text positions