TurfWars - Advanced Turf Wars Resource [QBC/ESX]

ylean_turfwars [:white_check_mark: RESOURCE IS OPEN SOURCE :white_check_mark:]

Hey, I created Turf Wars resource. This is remaster of my previous gang wars script [QBCore] Gang Wars / Turfs Takeover

Showcase

:sparkles: Features

  • Clean, fast and responsive NUI.
  • You can configure as many turfs as you need.
  • You can uniquely configure each turf (you can even choose the Ped model that will be located in it),
  • The ability to enable and fully configure monetary and item rewards for gang members for capturing a specific turf.
  • The option to make money laundering more challenging in a captured turf by enabling a fully configurable minigame.
  • Each gang has its own assigned color for the occupied territory.
  • You can enable the money laundering option for selected turfs and set the percentage of cash that players will receive after laundering money.
  • You can configure on which days, at what time, and for how long the wars for territories will last.
  • Item icons are imported directly from the qb-inventory folder, so you don’t have to worry about setting up your custom icons.
  • The script is very well optimized

:gear: Example Config:

Click here to see example config
Ylean = {}


Ylean.WarDates = {
    {day = "Monday", hour = 12, duration = 1}, 
    {day = "Tuesday", hour = 10, duration = 15},
    {day = "Wednesday", hour = 0, duration = 10}, -- hour 0 = midnight
    {day = "Thursday", hour = 0, duration = 15},
    {day = "Friday", hour = 12, duration = 10},
    {day = "Saturday", hour = 12, duration = 10},
    {day = "Sunday", hour = 12, duration = 10}
}

Ylean.Gangs = {
    {gang = "cartel", color = 0xa0e31180},
    {gang = "vagos", color = 0x0080BF80},
    {gang = "families", color = 0x9FDF809F},
    {gang = "lostmc", color = 0x600EB480},
    {gang = "triads", color = 0x84ff0080}
}

Ylean.TurfConfig = {
    main_blip = {
        type = 310,
        color = 1
    },

    radius_blip = {
        width = 100.0,
        color = 0xFFFFFFFF
    },

    capturing_blip = {  -- blinking one while capturing
        scale = 2.3,
        type = 3
    },

    capturing_time = 15000,

    capturing_cooldown = 30, --in seconds

    laundering_settings = {
        
        blackmoney_item_name = "markedbills",

        minigame_turn_on = true, --if turned off then no minigame is required to launder money
        CustomSettings = {
            settings = {
                handleEnd = true;  --Send a result message if true and callback when message closed or callback immediately without showing the message
                speed = 10; --pixels / second
                scoreWin = 500; --Score to win
                scoreLose = -150; --Lose if this score is reached
                maxTime = 60000; --sec
                maxMistake = 5; --How many missed keys can there be before losing
                speedIncrement = 1; --How much should the speed increase when a key hit was successful
            },
            keys = {"a", "w", "d", "s", "g"}; --You can hash this out if you want to use default keys in the java side.
        }
    }
}

Ylean.Turfs = {
    {
        id = 1,
        name = "Turf 1",

        turf_peds = {
            dealer_model = "s_m_y_dealer_01",
            dealer_ped = nil, -- DONT TOUCH!!

            soldier_model = "csb_mweather",
            milcrate_model = "gr_prop_gr_crates_sam_01a"
        },

        coords = vector4(324.78, -1841.6, 26.3, 49.75),
        radius = 20.0,

        capture_rewards = {
            money = {
                turn_on = true,
                type = "cash",

                amount = {
                    random = {
                        turn_on = true,
                        min_amount = 10,
                        max_amount = 10000,
                    },

                    constant_amount = 5000 -- if random is turned off
                }
            },

            items = {
                turn_on = true,

                random = {
                    turn_on = true,
                    min_amount = 1,
                    max_amount = 2 --do not set a higher amount than the amount of items in the variable items below (but if you do, the script is gonna assign max amount as the amount of items added to the variable below)
                },

                items = {
                    {item = "weapon_pistol", amount = 5, randomize_amount = true}, -- if randomize_amount == true, then the player will receive, for example, from 1 to 5 of weapon_pistol 
                    {item = "weapon_heavysniper", amount = 2, randomize_amount = false}
                }
            }
        },

        buying_items = {
            {item = "weapon_assaultrifle", label = "Assaultrifle", price = 100500},
            {item = "weapon_pistol", label = "Pistol", price = 20000},
            {item = "weapon_knife", label = "Knife", price = 1200},
            {item = "weapon_appistol", label = "AP Pistol", price = 10000}
        },

        selling_items = {
            {item = "phone", label = "Phone", price = 100},
            {item = "weapon_assaultrifle", label = "Assaultrifle", price = 100500},
            {item = "weapon_pistol", label = "Pistol", price = 100300},
            {item = "weapon_knife", label = "Knife", price = 120000}
        },

        money_laundering = {
            active = true, -- if set to false players wont be able to launder money in this turf
            percent = 0.8 -- 0.8 means player receive 80% in cash
        }
    }
}

RESMON [0.01-0.03 ms]

Documentations for both frameworks with example config included:

:shopping_cart: Tebex [ESX] - 20 + Taxes - https://ylean.tebex.io/package/5922713
:shopping_cart: Tebex [QBC] - 20 + Taxes - https://ylean.tebex.io/package/5922718

:scroll: Check out my other resources:

[STANDALONE] Heal on Kill
GeoMining - Earn by walking! [QBC & ESX]
Advanced AI EMS [QBCore & ESX]
[QBCore] Advanced Bitcoin System with ASIC Miners
[ESX] Betting on Hobo Fights
[QBCore] Bet on Hobo Fights
[ESX & QBCore]Advanced Loan System with Credit Score
[ESX & QBCore] MANAGE YOUR SERVER FROM DISCORD
[ESX & QBCore] ylean_delvehs - an advanced car removal resource
[ESX] ylean_noflyzones

Code is accessible Yes
Subscription-based No
Lines (approximately) ~1850
Requirements targeting resource
Support Yes
3 Likes

Good one. Will use it for sure. Thank you for releasing it!

1 Like