Weed Strains are not included, your server must have items made for each option in the config
Weed Farm V2 includes custom strains for your server.
Here you can customize your strain options
Each strain must follow the same format
Joint: joint item for strain
Effect: What effect the player will get when using this joint (see Effectsbelow)
Receive: How many joints players will recieve
Required: What weed item is required to make this joint
This can be the strains bag of weed, bud, whatever you'd like
Required Amount: How many of this weed item is required to make joint(s)
config.strains = {
['Northern Lights'] = {
joint = 'northern_lights_joint', -- Item name of the joint that player will receive
effect = 'stress', -- Effect that will be applied to player when smoking this joint
receive = 1, -- Amount of joints that player will receive
required = {
item = 'northern_lights_bag', -- Item name of the weed that is required to roll this joint (can be dry bud, bag of weed, whatever you want)
amount = 1, -- Amount of weed required to roll this joint
},
},
['Blue Dream'] = {
joint = 'blue_dream_joint',
effect = 'armor',
receive = 1,
required = {
item = 'blue_dream_bag',
amount = 1,
},
},
['Pineapple Express'] = {
joint = 'pineapple_express_joint',
effect = 'speed',
receive = 1,
required = {
item = 'pineapple_express_bag',
amount = 1,
},
},
['Sour Diesel'] = {
joint = 'sour_diesel_joint',
effect = 'stamina',
receive = 1,
required = {
item = 'sour_diesel_bag',
amount = 1,
},
},
['Strawberry Kush'] = {
joint = 'strawberry_kush_joint',
effect = 'health',
receive = 1,
required = {
item = 'strawberry_kush_bag',
amount = 1,
},
},
['Golden Goat'] = {
joint = 'golden_goat_joint',
effect = 'stress',
receive = 1,
required = {
item = 'golden_goat_bag',
amount = 1,
},
},
}
Effects
Here you can customize the different joint effects or even add your own!
Each effect in the Strains config must be included here.
The effect must include its logic / function / event within the action = function()
see the ['custom'] effect below:
located in effects.lua
effects = {
['stress'] = {
action = function()
local amount = 10
StressEffect(amount)
end
},
['stamina'] = {
action = function()
local duration = 60
local amount = 1
StaminaEffect(duration, amount)
end
},
['speed'] = {
action = function()
local duration = 30
local amount = 1.49 -- 1.49 is the max speed multiplier cant be above this or nothing will happen
SpeedEffect(duration, amount)
end
},
['armor'] = {
action = function()
local duration = 25
local amount = 1
ArmorEffect(duration, amount)
end
},
['health'] = {
action = function()
local duration = 25
local amount = 1
HealthEffect(duration, amount)
end
},
['custom'] = { -- name whatever tf you want
action = function()
local duration = 60
local amount = 1
-- Do something custom here such as trigger an event or function
--example: exports['ps-buffs']:AddBuff("hacking", 15000)
end
}
}
--- Functions:
StressEffect = function(duration, amount)
TriggerServerEvent('hud:server:RelieveStress', amount)
end
StaminaEffect = function(duration, amount)
local ped = PlayerPedId()
local startStamina = duration
SetFlash(0, 0, 500, 7000, 500)
while startStamina > 0 do
Wait(1000)
startStamina -= 1
RestorePlayerStamina(PlayerId(), 1.0)
end
end
SpeedEffect = function(duration, amount)
local ped = PlayerId()
SetRunSprintMultiplierForPlayer(ped, amount)
Wait(duration*1000)
SetRunSprintMultiplierForPlayer(ped, 1.0)
end
ArmorEffect = function(duration, amount)
local ped = PlayerPedId()
for i = 1, duration do
local current = GetPedArmour(ped)
SetPedArmour(ped, current+amount)
Wait(1000)
end
end
HealthEffect = function(duration, amount)
local ped = PlayerPedId()
for i = 1, duration do
local current = GetEntityHealth(ped)
SetEntityHealth(ped, current+amount)
Wait(1000)
end
end