Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coke Plant PR #98

Merged
merged 2 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions client/coke.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,19 @@ local function GenerateCocaLeafCoords()
end

local function SpawnCocaPlants()
while spawnedCocaLeaf < 15 do
Wait(0)
local weedCoords = GenerateCocaLeafCoords()
RequestModel(`mw_coke_plant`)
while not HasModelLoaded(`mw_coke_plant`) do
Wait(100)
end
local obj = CreateObject(`mw_coke_plant`, weedCoords.x, weedCoords.y, weedCoords.z, false, true, false)
PlaceObjectOnGroundProperly(obj)
FreezeEntityPosition(obj, true)
table.insert(CocaPlants, obj)
spawnedCocaLeaf += 1
end
while spawnedCocaLeaf < 15 do
Wait(0)
local weedCoords = GenerateCocaLeafCoords()
RequestModel(`h4_prop_bush_cocaplant_01`)
while not HasModelLoaded(`h4_prop_bush_cocaplant_01`) do
Wait(100)
end
local obj = CreateObject(`h4_prop_bush_cocaplant_01`, weedCoords.x, weedCoords.y, weedCoords.z, false, true, false)
PlaceObjectOnGroundProperly(obj)
FreezeEntityPosition(obj, true)
table.insert(CocaPlants, obj)
spawnedCocaLeaf += 1
end
end


Expand Down
2 changes: 1 addition & 1 deletion client/target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ CreateThread(function()
end)

CreateThread(function()
exports['qb-target']:AddTargetModel("mw_coke_plant", {
exports['qb-target']:AddTargetModel("h4_prop_bush_cocaplant_01", {
options = {
{
type = "client",
Expand Down