(optional, install only if you want money laundering minigame)
2. Explanation of the configuration.
example config (scroll down for explanation):
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 = 10, --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
}
},
{
id = 2,
name = "Turf 2",
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(-105.2, -1461.58, 32.4, 320.63),
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 = "coke", 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
}
}
}
Ylean.WarDates
Ylean.Gangs
The "gang" variable defines the name of the gang that can occupy territory during gang wars, while the "color" variable represents the color of the turf border on the minimap, which changes after a gang has taken control of a turf.
Ylean.TurfConfig
The "capturing_time" variable determines the time it takes to capture a specific zone, with the time being specified in milliseconds (1000 ms = 1 second).
The "capturing_cooldown" is a variable that defines the time one must wait when turf capturing is interrupted due to the capturer's death or leaving the turf area.
Ylean.Turfs
The configuration structure for each turf:
{
int id,
string name,
turf_peds = {
string dealer_model,
object dealer_ped,
string soldier_model,
string milcrate_model
},
coords = vector4(x, y, z, heading),
float radius,
capture_rewards = {
money = {
bool turn_on,
string type,
amount = {
random = {
bool turn_on,
int min_amount,
int max_amount
},
int constant_amount
}
},
items = {
bool turn_on,
random = {
bool turn_on,
int min_amount,
int max_amount
},
items = {
{string item, int amount, bool randomize_amount},
}
}
},
buying_items = {
{string item, string label, int price},
...
},
selling_items = {
{string item, string label, int price},
...
},
money_laundering = {
bool active,
float percent
}
}
Important!
When adding a new turf to the configuration, assign it an ID that is unique and not used by any other turf.
name - A variable used to define the name of a particular turf (this name is displayed in the main_blip label).
radius - The variable that specifies the radius of a given turf (when a player exits this radius during turf capturing, the capturing process is canceled).
capture_rewards
Inside "capture_rewards," we specify monetary and/or item rewards for the gang that captures a particular turf.
capture_rewards.money.turn_on - This variable toggles monetary rewards on or off for capturing a specific turf.
There are two ways to allocate monetary rewards for capturing a turf:
Constant monetary reward - enable it by setting the value of the variable capture_rewards.money.amount.random.turn_on to false. In this case, players will receive the value defined in the variable capture_rewards.money.constant_amount.
Random monetary reward - players receive a specific random amount of money when the variable capture_rewards.money.amount.random.turn_on is set to true. The minimum amount of money is defined by the variable capture_rewards.money.amount.random.min_amount, and the maximum amount is defined by the variable capture_rewards.money.amount.random.max_amount.
capture_rewards.items.turn_on - This variable toggles item rewards on or off for capturing a specific turf.
There are two ways to allocate item rewards for capturing a turf:
Fixed item reward - enable it by setting the value of the variable capture_rewards.items.random.turn_on to false. In this case, players will receive all the items from the "items.items" array.
For example:
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}
}
Each item has the option to randomize the quantity. For instance, when "amount = 3" and "randomize_amount = true," the player will receive a quantity ranging from 1 to 3 of the specified item.
Random item reward - available when capture_rewards.items.random.turn_on is set to true. In this case, you need to specify the minimum and maximum quantity of items that players will receive after capturing a turf.
For example:
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 "items" variable below (but if you do, the script is gonna assign the 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}
}
}
As seen in the example above, when "random.turn_on = true," the minimum value is set to 1 and the maximum to 2. This means that a player can receive either one item, such as "weapon_pistol," or two items, including "weapon_pistol" and "weapon_heavy_sniper," in quantities specified within the "items" array.