Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 5054aee

Browse files
committed
Fix blip removal and entity deletion
1 parent 189e9aa commit 5054aee

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

hitman/[Core]/[Client]/bounty.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ local SearchingBodies = false
3838
local GPSToBodyIsSet = false
3939
local SaveGuard = false
4040
local GPStoSDboardactive = false
41-
41+
hashedenemyblipglobal = nil
4242
--local unashedblip = 'blip_mp_attack_target'
4343
--local hashedblip = GetHashKey(unashedblip)
4444
--BlipAddForEntity(hashedblip, rawpeds)
@@ -69,6 +69,7 @@ AddEventHandler('RootLodge:HitContracts:C:SetUpMission', function()
6969
Citizen.InvokeNative(0x283978A15512B2FE, CreateNPC[k], true)
7070
--Citizen.InvokeNative(0x23f74c2fda6e7c61, 639638961, CreateNPC[k])
7171
--addBlipForCoords("GROUP OF TARGETS", 1366733613, v.Coords.x, v.Coords.y, v.Coords.z)
72+
let hashedenemyblipglobal = GetHashKey("blip_ambient_marked_for_death")
7273
addBlipForCoords("Contract Target",GetHashKey("blip_ambient_marked_for_death"),{v.Coords.x,v.Coords.y,v.Coords.z})
7374
NPCx, NPCy, NPCz = v.x, v.y, v.z
7475
GiveWeaponToPed_2(CreateNPC[k], rWeapon, 50, true, true, 1, false, 0.5, 1.0, 1.0, true, 0, 0)
@@ -108,6 +109,7 @@ AddEventHandler('RootLodge:HitContracts:C:SetUpMission', function()
108109
SetGpsMultiRouteRender(false)
109110
CenterBottomNotify('You managed to kill all targets', 5000)
110111
SearchingBodies = true
112+
RemoveBlip(hashedenemyblipglobal)
111113
Wait(5000)
112114
CenterBottomNotify('Search the body for evidence to confirm the kill!', 5000)
113115
while SearchingBodies do Wait(1)
@@ -145,8 +147,8 @@ AddEventHandler('RootLodge:HitContracts:C:SetUpMission', function()
145147
MissionStatus = false
146148
ClearGpsMultiRoute()
147149
SetGpsMultiRouteRender(false)
148-
for k, v in pairs(ArrayTargets[k]) do DeletePed(v) Wait(500) end
149-
for k, v in pairs(CreateNPC[k]) do DeletePed(v) Wait(500) end
150+
for k, v in pairs(ArrayTargets[k]) do DeleteEntity(v) Wait(500) end
151+
for k, v in pairs(CreateNPC[k]) do DeleteEntity(v) Wait(500) end
150152
ArrayTargets = {}
151153
CreateNPC = {}
152154
TotalEnemies = 0

0 commit comments

Comments
 (0)