Update cocaine.lua
This commit is contained in:
1 parent
b6b4776ab2
commit
6aea184058
1 file changed
+1
-8
+1
-8
@@ -6,12 +6,8 @@ local baggingcoke = nil
|
|||||||
RegisterNetEvent('coke:respawnCane', function(loc)
|
RegisterNetEvent('coke:respawnCane', function(loc)
|
||||||
local v = GlobalState.CocaPlant[loc]
|
local v = GlobalState.CocaPlant[loc]
|
||||||
local hash = GetHashKey(v.model)
|
local hash = GetHashKey(v.model)
|
||||||
--if not HasModelLoaded(hash) then LoadModel(hash) end
|
|
||||||
if not CocaPlant[loc] then
|
if not CocaPlant[loc] then
|
||||||
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
|
CocaPlant[loc] = CreateObject(hash, v.location, false, true, true)
|
||||||
-- SetEntityAsMissionEntity(CocaPlant[loc], true, true)
|
|
||||||
-- FreezeEntityPosition(CocaPlant[loc], true)
|
|
||||||
-- SetEntityHeading(CocaPlant[loc], v.heading)
|
|
||||||
Freeze(CocaPlant[loc], true, v.heading)
|
Freeze(CocaPlant[loc], true, v.heading)
|
||||||
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
|
exports['qb-target']:AddTargetEntity(CocaPlant[loc], {
|
||||||
options = { {
|
options = { {
|
||||||
@@ -39,9 +35,6 @@ RegisterNetEvent("coke:init", function()
|
|||||||
if not HasModelLoaded(hash) then LoadModel(hash) end
|
if not HasModelLoaded(hash) then LoadModel(hash) end
|
||||||
if not v.taken then
|
if not v.taken then
|
||||||
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
|
||||||
-- SetEntityAsMissionEntity(CocaPlant[k], true, true)
|
|
||||||
-- FreezeEntityPosition(CocaPlant[k], true)
|
|
||||||
-- SetEntityHeading(CocaPlant[k], v.heading)
|
|
||||||
Freeze(CocaPlant[k], true, v.heading)
|
Freeze(CocaPlant[k], true, v.heading)
|
||||||
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
|
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
|
||||||
options = { {
|
options = { {
|
||||||
@@ -160,4 +153,4 @@ CreateThread(function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
Reference in new issue
Block a user