#Possible Gang Levels

56 messages · Page 1 of 1 (latest)

warm birch
#

Sick

#

I was looking for something like this

#

As a suggestion add events that you can youse in other scripts to they can like earn xp with crafting

mystic quiver
#

So just when a gang member crafts something they earn gang xp? That would be possible with the current version, you just need to use the export as shown in the readme (presuming you have access to the code of the crafting script)

coarse karma
#

Just to be more flexible

mystic quiver
#

Yeah, will do some commands too so admins can manage if needed. Just wanted to get it out there as had it working in a basic form and want to gage interest in future work on it, otherwise I lose the idea of releasing and end up just making it specific to my City

#

I think in future I'll make a free Gang MDT. Then work on a paid territory script that implements with it all

coarse karma
#

aight good luck!

mystic quiver
# warm birch Im trying to make my own

Let me know if you need any help implementing the gang stuff from here

I'll add the below tonight:

  • Export for GetGangLevel
  • Command for SetGangXP - allows admins to set gang xp
  • Command for RemoveGangXP - allows admins to remove gang xp
  • Command for GangLevel - allows players to check their gangs level
warm birch
#

Sick

coarse karma
#

If went to jail, remove gang reputation points (exp) or smth

mystic quiver
#

Good idea, I pretty much have the commands done, so will spread them out into a commands.lua and create an export for that too in the main

sturdy niche
#

Could add integration to the boss menu for gangs (eg on the top of the menu it reads the levels)

mystic quiver
mystic quiver
# mystic quiver Let me know if you need any help implementing the gang stuff from here I'll add...

https://github.com/ashleyjrobinson/possible-gang-levels

Have completed the above changes and updated the readme with examples

ox_lib commands utilised for the commands and Gang Level notification.

GitHub

Add the ability for gang members to earn xp for their gang! - GitHub - ashleyjrobinson/possible-gang-levels: Add the ability for gang members to earn xp for their gang!

warm birch
#

Sick

#

How could I make a check for gang level before you can so something for example craft

mystic quiver
#

There's an example in the readme

local gangName = Player.PlayerData.gang.name
exports['possible-gang-levels']:GetGangLevel(gangName, function(gangLevel)
if gangLevel == 3 then
print(('The gang level for %s is %d'):format(gangName, gangLevel))
else
print(('Gang level not met'):format(gangName))
end
end)

#

So you'd want to edit the conditional statement to however you'd like and then trigger whatever you'd want inside it, else notify the player through a notification they don't have the gang level?

I don't think these threads are allowed for support, so if you need any help - feel free to message me

coarse karma
#

hmm btw why is it linked to gang specifically

#

wouldnt it be better if you connect it to player and just get gang what user is in

#

like GetGangLevel

#

but with qbcore (or w.e) data

mystic quiver
#

Sorry, so not declaring the variable in the external script?

#

I will do a bit of a refactor this weekend as kind of rushed these updates out today

coarse karma
#

basically

PlayerGang = QBCore.Functions.GetPlayerData().gang
print(exports.GetGangLevel(PlayerGang))

mystic quiver
#

Is it not as similar approach just pulling from Player.PlayerData.gang.name? Or are you suggesting to handle it in the GetGangLevel function itself?

mystic quiver
#
  • Added notifications for the Add and Remove exports, optionable via the config
mystic quiver
#

[FREE] Possible Gang Levels

mystic quiver
#
  • setgangxp and removegangxp now give success notifications
  • removegangxp now syncs level and xp when triggered

Need to work on the rest of the commands etc keeping the level in sync with the xp only update export and remove command do this currently, will do so tomorrow

mystic quiver
#

For those following/ interested, I'll be pushing out an update tonight that allows for managing gang stashes through the config within this script, it takes the gang level and multiplies it to set the max weight for the stash size, this feature will only be ox_inventory compatible, with no plan on making it qb.. yet

warm birch
#

Fire

#

I love it

#

How do you make the stash size increase with gang level?

mystic quiver
#

it pulls the gangLevel from the db and multiplies it by the configurable config.StashMultiplier to set the max weight of the stash

#

Once released going to work on handling gang shops within this resource too, this will use ox_lib menus pull a list of configurable items and do a check for required gang level on each, so if the gang has the level required they can buy the item.

Once that's done and tested I'll likely do a v1 release and make a video and put it on the cfx forums

warm birch
#

nice

warm birch
#

This could be also used to level up jobs, not just gangs

mystic quiver
warm birch
#

Sick

mystic quiver
#

Have the shops working too locally, need to push tomorrow

mystic quiver
#

Have done a lot of updates to this and made a preview video if using ox_inv this can now handle gang stashes and gang shops, increasing the stash capacity based off gang level and the shop can level lock items based off gang level>

Have added a video to the op

mystic quiver
#

Have added a new command /viewganglevels, this now display an ox_lib menu of all the gang and their levels from the db

fringe delta
#

How do gangs increase their levels or is that a staff thing or do the dev need to implement the exports into other criminal things?

mystic quiver
#

Yeah it's up to the Devs how they want to integrate the exports and what they what they want to integrate it with

mystic quiver
#

Pushed an update on my lunch that now displays a progress bar to next level in the /viewganglevels command

crimson raven
#

its been deleted?

elfin bear
#

Yeah

mystic quiver
#

Possible Gang Levels

#

I've taken it down from public release as I've shifted direction to begin working on a server