fix(client): Disable EntityCollision for the mask and tank (#18)
this will disable the Collision for the mask and tank entities so they dont act like a bullet proof
This commit is contained in:
@@ -65,10 +65,12 @@ local function attachGear()
|
|||||||
lib.requestModel(tankModel)
|
lib.requestModel(tankModel)
|
||||||
|
|
||||||
currentGear.tank = CreateObject(tankModel, 1.0, 1.0, 1.0, true, true, false)
|
currentGear.tank = CreateObject(tankModel, 1.0, 1.0, 1.0, true, true, false)
|
||||||
|
SetEntityCollision(currentGear.tank, false, false) --- Disable collision for the tank so it doesn't block bullets
|
||||||
local bone1 = GetPedBoneIndex(cache.ped, 24818)
|
local bone1 = GetPedBoneIndex(cache.ped, 24818)
|
||||||
AttachEntityToEntity(currentGear.tank, cache.ped, bone1, -0.25, -0.25, 0.0, 180.0, 90.0, 0.0, true, true, false, false, 2, true)
|
AttachEntityToEntity(currentGear.tank, cache.ped, bone1, -0.25, -0.25, 0.0, 180.0, 90.0, 0.0, true, true, false, false, 2, true)
|
||||||
|
|
||||||
currentGear.mask = CreateObject(maskModel, 1.0, 1.0, 1.0, true, true, false)
|
currentGear.mask = CreateObject(maskModel, 1.0, 1.0, 1.0, true, true, false)
|
||||||
|
SetEntityCollision(currentGear.mask, false, false) --- Disable collision for the mask so it doesn't block bullets
|
||||||
local bone2 = GetPedBoneIndex(cache.ped, 12844)
|
local bone2 = GetPedBoneIndex(cache.ped, 12844)
|
||||||
AttachEntityToEntity(currentGear.mask, cache.ped, bone2, 0.0, 0.0, 0.0, 180.0, 90.0, 0.0, true, true, false, false, 2, true)
|
AttachEntityToEntity(currentGear.mask, cache.ped, bone2, 0.0, 0.0, 0.0, 180.0, 90.0, 0.0, true, true, false, false, 2, true)
|
||||||
SetModelAsNoLongerNeeded(maskModel)
|
SetModelAsNoLongerNeeded(maskModel)
|
||||||
|
|||||||
Reference in New Issue
Block a user