Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
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
8 changes: 4 additions & 4 deletions hitman/[Core]/[Client]/bounty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ local Weapons = {
--------------------------------------------------------------------------------
-- Core
--------------------------------------------------------------------------------
RegisterNetEvent('RootLodge:BountyHunter:C:SetUpMission')
RegisterNetEvent('RootLodge:BountyHunter:C:ResetTotalKills')
RegisterNetEvent('RootLodge:HitContracts:C:SetUpMission')
RegisterNetEvent('RootLodge:HitContracts:C:ResetTotalKills')
--------------------------------------------------------------------------------
TotalKilled = 0
local ArrayBounties = {}
Expand All @@ -39,7 +39,7 @@ local alwaysfalse = false
local alwaystrue = true
--------------------------------------------------------------------------------

AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function()
AddEventHandler('RootLodge:HitContracts:C:SetUpMission', function()
-- Make sure this script does not execute twice.
SaveGuard = true

Expand Down Expand Up @@ -167,6 +167,6 @@ AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function()
GPStoSDboardactive = true
end

AddEventHandler('RootLodge:BountyHunter:C:ResetTotalKills', function()
AddEventHandler('RootLodge:HitContracts:C:ResetTotalKills', function()
TotalKilled = 0
end)
10 changes: 5 additions & 5 deletions hitman/[Core]/[Client]/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local ActiveMenu = nil
local MenuOpen = false
local Location = nil

RegisterNetEvent('RootLodge:BountyHunter:C:StartMission')
RegisterNetEvent('RootLodge:HitContracts:C:StartMission')
--------------------------------------------------------------------------------
-- Core
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -54,15 +54,15 @@ Citizen.CreateThread(function()
if (dist <= 5) and not InRange then
InRange = true
Location = v.City
TriggerEvent('RootLodge:BountyHunter:C:StartMission')
TriggerEvent('RootLodge:HitContracts:C:StartMission')
end
end
end
end
end)

-- Check players distance from the stores.
AddEventHandler('RootLodge:BountyHunter:C:StartMission', function()
AddEventHandler('RootLodge:HitContracts:C:StartMission', function()
local ped = PlayerPedId()
while InRange do Wait(1)
local coords = GetEntityCoords(ped)
Expand Down Expand Up @@ -138,11 +138,11 @@ function PVEMenu ()

if hunt then
Location = nil
TriggerServerEvent('RootLodge:BountyHunter:S:CheckCharacter')
TriggerServerEvent('RootLodge:HitContracts:S:CheckCharacter')
end

if payment and (TotalKilled > 0)then
TriggerServerEvent('RootLodge:BountyHunter:S:PayDay', TotalKilled)
TriggerServerEvent('RootLodge:HitContracts:S:PayDay', TotalKilled)
TotalKilled = 0
SetGpsMultiRouteRender(false)
Location = nil
Expand Down
12 changes: 6 additions & 6 deletions hitman/[Core]/[Server]/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ function Wait(args) Citizen.Wait(args) end
function Invoke(args, bool) Citizen.InvokeNative(args, bool) end
--------------------------------------------------------------------------------
-- Event Register
RegisterServerEvent('RootLodge:BountyHunter:S:PayDay')
RegisterServerEvent('RootLodge:BountyHunter:S:CheckCharacter')
RegisterServerEvent('RootLodge:HitContracts:S:PayDay')
RegisterServerEvent('RootLodge:HitContracts:S:CheckCharacter')
--------------------------------------------------------------------------------
-- Core
--------------------------------------------------------------------------------
-- Variables
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
AddEventHandler('RootLodge:BountyHunter:S:PayDay', function(KillCount)
AddEventHandler('RootLodge:HitContracts:S:PayDay', function(KillCount)
local BPK = Payment.Money.BPK
local XPK = Payment.XP.XPK
local mMin = Payment.Money.Min
Expand Down Expand Up @@ -48,17 +48,17 @@ AddEventHandler('RootLodge:BountyHunter:S:PayDay', function(KillCount)
xPay = vEXP
end

TriggerClientEvent('RootLodge:BountyHunter:C:ResetTotalKills', source)
TriggerClientEvent('RootLodge:HitContracts:C:ResetTotalKills', source)
TriggerClientEvent("vorp:TipRight", source, "You received $"..mPay..' and '..xPay..' XP', 5000)
end)



AddEventHandler('RootLodge:BountyHunter:S:CheckCharacter', function()
AddEventHandler('RootLodge:HitContracts:S:CheckCharacter', function()
local User = VorpCore.getUser(source)
if User ~= nil then
local Character = User.getUsedCharacter
TriggerClientEvent('RootLodge:BountyHunter:C:SetUpMission', source)
TriggerClientEvent('RootLodge:HitContracts:C:SetUpMission', source)
end
end)

Expand Down