- update sv side plants
This commit is contained in:
1 parent
2dd8729dc9
commit
94c6458037
13 files changed
+239
-410
No files matched your search
@@ -1,52 +1,5 @@
|
||||
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local weedPlant = {
|
||||
{ location = vector3(1064.84, -3199.84, -42.70), heading = 334.49, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1063.88, -3198.69, -42.70), heading = 329.56, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1061.68, -3196.46, -42.70), heading = 25.16, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1061.62, -3199.63, -42.70), heading = 21.52, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1062.82, -3197.70, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1064.69, -3196.31, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1062.92, -3198.78, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1049.73, -3201.92, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1052.94, -3202.21, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1051.93, -3201.17, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1050.98, -3201.13, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1050.89, -3200.07, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1050.89, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
{ location = vector3(1049.72, -3198.95, -42.70), heading = 202.97, model = "bkr_prop_weed_lrg_01b"},
|
||||
|
||||
}
|
||||
GlobalState.WeedPlant = weedPlant
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
for _, v in pairs(weedPlant) do
|
||||
v.taken = false
|
||||
end
|
||||
end)
|
||||
|
||||
function WeedCooldown(loc)
|
||||
CreateThread(function()
|
||||
Wait(Config.respawnTime * 1000)
|
||||
weedPlant[loc].taken = false
|
||||
GlobalState.WeedPlant = weedPlant
|
||||
Wait(1000)
|
||||
TriggerClientEvent('weed:respawnCane', -1, loc)
|
||||
Log('Weed Plant Respawned At ' .. weedPlant[loc].location, 'weed')
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterNetEvent("weed:pickupCane", function(loc)
|
||||
if CheckDist(source, weedPlant[loc].location) then return end
|
||||
if not weedPlant[loc].taken then
|
||||
weedPlant[loc].taken = true
|
||||
GlobalState.WeedPlant = weedPlant
|
||||
TriggerClientEvent("weed:removeCane", -1, loc)
|
||||
WeedCooldown(loc)
|
||||
AddItem(source, 'wetcannabis', 1)
|
||||
Log(GetName(source) .. ' Picked Weed With a distance of ' .. dist(source, weedPlant[loc].location) .. ' vectors', 'weed')
|
||||
end
|
||||
end)
|
||||
--------------- events
|
||||
|
||||
RegisterServerEvent('md-drugs:server:dryoutweed', function()
|
||||
|
||||
Reference in new issue
Block a user