diff --git a/README.md b/README.md index 51940ac..1315b23 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,23 @@ QOL, jobs, and more in this RedM script! Jobs: -More NPC's! Peds, animals, etc! - In Progress -Postal Delivery - In Progress -Stagecoach Transporting - In progress -Hitman Contracts (Illegal) - In Progress -Stagecoach robberies - Coming soon +Postal Delivery +More coming soon! + +## To Do +- [ x ] More NPC's +- [ ] Postal Delivery +- [ ] Stagecoach Transporting +- [ x ] Hitman Contracts +- [ ] Stagecoach robberies +- [ x ] Automatic Updating +- [ x ] More Life +- [ x ] More Life Config +- [ ] Postal Delivery Config +- [ ] Stagecoach Transporting Config +- [ x ] Hitman Contracts Config +- [ ] Stagecoach Robberies + ## Installation Download the latest releases, extract unto the following names (name the folders this) @@ -37,4 +49,27 @@ Players can meet a High Society member in Saint Denis that will send letters, an Players can rob stagecoaches across the county, if they find certain loot, the payout would be great. Difficult and lots of hordes of enemies. ## Automatic Updating -Follow the steps in #Installation \ No newline at end of file +Follow the steps in #Installation + + + + +## Resources Used +https://redlookup.com/ +https://www.rdr2mods.com/wiki/ped-search/?pedtype=0& +https://github.com/femga/rdr3_discoveries/tree/master/useful_info_from_rpfs/textures/blips +https://rdr3natives.github.io/ +https://github.com/DevDokus/RedM-BountyHunter +## To Do +- [ ] More NPC's +- [ ] Postal Delivery +- [ ] Stagecoach Transporting +- [ ] Hitman Contracts +- [ ] Stagecoach robberies +- [ ] Automatic Updating +- [ ] More Life +- [ ] More Life Config +- [ ] Postal Delivery Config +- [ ] Stagecoach Transporting Config +- [ ] Hitman Contracts Config +- [ ] Stagecoach Robberies diff --git a/hitman/[Core]/[Client]/bounty.lua b/hitman/[Core]/[Client]/bounty.lua index dd023b8..2046d17 100644 --- a/hitman/[Core]/[Client]/bounty.lua +++ b/hitman/[Core]/[Client]/bounty.lua @@ -8,9 +8,11 @@ local Models = { "A_F_M_BlWTownfolk_01", "A_F_M_BlWTownfolk_02", "A_F_M_BlWUpperClass_01", "A_F_M_BtcHillbilly_01", "A_F_M_RhdTownfolk_01", "A_F_M_RhdTownfolk_02", "A_F_M_ROUGHTRAVELLERS_01", "A_F_M_SDChinatown_01", "A_F_M_SDSlums_02", "A_F_M_StrTownfolk_01", "A_F_M_TumTownfolk_01", "A_F_M_TumTownfolk_02", - "mp_dr_u_m_m_MISTAKENBOUNTIES_01", + "mp_dr_u_m_m_MISTAKENBOUNTIES_01", "A_M_M_BynSurvivalist_01", "U_M_O_BlWPoliceChief_01" } +local Wagons = {} + local Weapons = { 0x772C8DD6, 0x169F59F7, 0xDB21AC8C, 0x6DFA071B, 0xF5175BA1, 0xD2718D48, 0x797FBF5, 0x772C8DD6, @@ -22,11 +24,11 @@ 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 = {} +local ArrayTargets = {} local CreateNPC = {} local NPCx, NPCy, NPCz = 0, 0, 0 local InMission = false @@ -39,7 +41,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 @@ -48,10 +50,10 @@ AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function() -- Stop the user if alwaysfalse and not alwaystrue then Notify("Something has went terribly wrong. Please contact the server administrator!", 1000) return end - -- Get a random bounty ID - local rLoc = Bounties[math.random(#Bounties)] + -- Get a random target/contract ID + local rLoc = Contracts[math.random(#Contracts)] -- Get all NPCs associated with this ID - for k, v in pairs(Bounties) do + for k, v in pairs(Contracts) do if v.ID == rLoc.ID then TotalEnemies = TotalEnemies + 1 -- Get a random model for this NPC @@ -68,7 +70,7 @@ AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function() GiveWeaponToPed_2(CreateNPC[k], rWeapon, 50, true, true, 1, false, 0.5, 1.0, 1.0, true, 0, 0) SetCurrentPedWeapon(CreateNPC[k], rWeapon, true) TaskCombatPed(CreateNPC[k], PlayerPedId()) - ArrayBounties[k] = CreateNPC[k] + ArrayTargets[k] = CreateNPC[k] end end @@ -79,9 +81,9 @@ AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function() -- Start the GPS --StartGpsMultiRoute(6, true, true) - -- Add the coordinates of the NPCs in ArrayBounties to the GPS route - --for k, v in pairs(ArrayBounties) do - --local npcCoords = GetEntityCoords(ArrayBounties[k]) + -- Add the coordinates of the NPCs in ArrayTargets to the GPS route + --for k, v in pairs(ArrayTargets) do + --local npcCoords = GetEntityCoords(ArrayTargets[k]) --AddPointToGpsMultiRoute(npcCoords.x, npcCoords.y, npcCoords.z) --end @@ -89,33 +91,33 @@ AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function() --SetGpsMultiRouteRender(true) Wait(1000) - Notify('Your Bounty is located on the map!', 5000) + Notify('Your target has been located. Check your map!', 5000) Wait(2000) Notify('We need them dead, not alive! But Dead!', 5000) Wait(1500) - Notify('You can stack bounties, just keep in mind', 5000) + Notify('You can stack Contracts, just keep in mind', 5000) Wait(1000) - Notify('that you lose the bounties if you died!', 5000) + Notify('that you lose the Contracts if you died!', 5000) InMission = true SaveGuard = false while InMission do Wait(1) - for k, v in pairs(ArrayBounties) do + for k, v in pairs(ArrayTargets) do if not GPSToBodyIsSet then GPSToBodyIsSet = true StartGpsMultiRoute(6, true, true) - local npcCoords = GetEntityCoords(ArrayBounties[k]) + local npcCoords = GetEntityCoords(ArrayTargets[k]) AddPointToGpsMultiRoute(npcCoords.x, npcCoords.y, npcCoords.z) SetGpsMultiRouteRender(true) end if IsEntityDead(v) then - local eCoords = GetEntityCoords(ArrayBounties[k]) + local eCoords = GetEntityCoords(ArrayTargets[k]) - if ArrayBounties[k] ~= nil then + if ArrayTargets[k] ~= nil then TotalEnemies = TotalEnemies - 1 TotalKilled = TotalKilled + 1 - ArrayBounties[k] = nil + ArrayTargets[k] = nil if TotalEnemies == 0 then SetGpsMultiRouteRender(false) TriggerEvent("vorp:TipRight", 'You managed to kill all targets', 5000) @@ -156,17 +158,17 @@ AddEventHandler('RootLodge:BountyHunter:C:SetUpMission', function() ClearGpsMultiRoute() SetGpsMultiRouteRender(false) for k, v in pairs(CreateNPC) do DeletePed(v) Wait(500) end - table.remove{CreateNPC} table.remove{ArrayBounties} + table.remove{CreateNPC} table.remove{ArrayTargets} end function GPStoBoards () - bb2 = BountyBoards[2] + bb2 = HandlerLocations[2] StartGpsMultiRoute(6, true, true) AddPointToGpsMultiRoute(bb2.x, bb2.y, bb2.z) SetGpsMultiRouteRender(true) GPStoSDboardactive = true end - AddEventHandler('RootLodge:BountyHunter:C:ResetTotalKills', function() + AddEventHandler('RootLodge:HitContracts:C:ResetTotalKills', function() TotalKilled = 0 end) \ No newline at end of file diff --git a/hitman/[Core]/[Client]/main.lua b/hitman/[Core]/[Client]/main.lua index cc83dbf..ac27f09 100644 --- a/hitman/[Core]/[Client]/main.lua +++ b/hitman/[Core]/[Client]/main.lua @@ -9,7 +9,7 @@ local ActiveMenu = nil local MenuOpen = false local Location = nil -RegisterNetEvent('RootLodge:BountyHunter:C:StartMission') +RegisterNetEvent('RootLodge:HitContracts:C:StartMission') -------------------------------------------------------------------------------- -- Core -------------------------------------------------------------------------------- @@ -23,7 +23,7 @@ end Citizen.CreateThread(function() - for _, board in ipairs(BountyBoards) do + for _, board in ipairs(HandlerLocations) do local blipName = board.City local blipHash = GetHashKey("blip_summer_guard") -- Replace with your blip style addBlipForCoords(blipName, blipHash, {board.x, board.y, board.z}) @@ -36,7 +36,7 @@ Citizen.CreateThread(function() while true do Wait(2000) local ped = PlayerPedId() local coords = GetEntityCoords(ped) - for k, v in pairs(BountyBoards) do + for k, v in pairs(HandlerLocations) do local dist = GetDistanceBetweenCoords(coords.x, coords.y, coords.z, v.x, v.y, v.z) @@ -54,7 +54,7 @@ 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 @@ -62,11 +62,11 @@ Citizen.CreateThread(function() 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) - for k, v in pairs(BountyBoards) do + for k, v in pairs(HandlerLocations) do local x, y, z = v.x, v.y, v.z local dist = GetDistanceBetweenCoords(coords.x, coords.y, coords.z, x, y, z) @@ -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 diff --git a/hitman/[Core]/[Server]/main.lua b/hitman/[Core]/[Server]/main.lua index 2e5fe67..98aec6c 100644 --- a/hitman/[Core]/[Server]/main.lua +++ b/hitman/[Core]/[Server]/main.lua @@ -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 @@ -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) diff --git a/hitman/config.lua b/hitman/config.lua index cabd533..6b5ee82 100644 --- a/hitman/config.lua +++ b/hitman/config.lua @@ -29,10 +29,10 @@ Payment = { } } -------------------------------------------------------------------------------- --- Here you can add all BountyBoards Menu locations. +-- Here you can add all HandlerLocations Menu locations. -- The City name does nothing! this is just a visual reference. -------------------------------------------------------------------------------- -BountyBoards = { +HandlerLocations = { { City = 'Valentine', x = -274.8, y = 805.5, z = 119.3 }, { City = 'Saint Denis', x = 2513.4, y = -1305.2, z = 48.9 }, { City = 'Blackwater', x = -758.0, y = -1266.0, z = 44.0 }, @@ -42,14 +42,14 @@ BountyBoards = { -------------------------------------------------------------------------------- --- These are the NPC bounties you can hunt. If you want to add +-- These are the NPC Contracts you can hunt. If you want to add -- new location/mission, just add the coordinates on the list. -- NOTE: that the IDs are what combines the enemies in a group. -- If ID 1 is selected by the randomizer, all enemies with -- ID 1 will be selected for the mission. The more enties -- on the same ID, there more you have to kill per mission. -------------------------------------------------------------------------------- -Bounties = { +Contracts = { {ID = 1, Coords = { x = -30.77, y = 1226.8, z = 172.92 }}, {ID = 1, Coords = { x = -33.77, y = 1229.8, z = 172.92 }}, {ID = 2, Coords = { x = 489.53, y = 619.81, z = 111.7 }}, diff --git a/hitman/fxmanifest.lua b/hitman/fxmanifest.lua index f5c64f4..759c94a 100644 --- a/hitman/fxmanifest.lua +++ b/hitman/fxmanifest.lua @@ -5,7 +5,7 @@ description 'A customizable bounty hunting system for vorp' author 'RootLodge Github' fx_version "adamant" games {"rdr3"} -version '1.1.0' +version '1.2.0' shared_script 'config.lua' client_scripts { 'config.lua', '[Core]/[Client]/*.lua' } diff --git a/morelife/traffic.lua b/morelife/traffic.lua index c220cc8..84b5c22 100644 --- a/morelife/traffic.lua +++ b/morelife/traffic.lua @@ -1,7 +1,7 @@ local config = { - pedFrequency = 6.0, -- Controls the amount of random peds walking/standing around (0.0 = None | 0.5 = Half as Many | 1.0 = Normal | 2.0 = Twice as Many) - trafficFrequency = 6.0, -- Controls the amount of vehicles driving around and also controls the amount of parked vehicles (0.0 = None | 0.5 = Half as Many| 1.0 = Normal | 2.0 = Twice as Many) - animalFrequency = 6.0, -- Controls the amount of animals walking/standing around (0.0 = None | 0.5 = Half as Many | 1.0 = Normal | 2.0 = Twice as Many) + pedFrequency = 32.0, -- Controls the amount of random peds walking/standing around (0.0 = None | 0.5 = Half as Many | 1.0 = Normal | 2.0 = Twice as Many) + trafficFrequency = 32.0, -- Controls the amount of vehicles driving around and also controls the amount of parked vehicles (0.0 = None | 0.5 = Half as Many| 1.0 = Normal | 2.0 = Twice as Many) + animalFrequency = 16.0, -- Controls the amount of animals walking/standing around (0.0 = None | 0.5 = Half as Many | 1.0 = Normal | 2.0 = Twice as Many) } -- Please do not edit below this line! -- diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..852c44d --- /dev/null +++ b/versions.json @@ -0,0 +1,8 @@ +{ + "hitman": { + "currentversion": "1.2.0" + }, + "morelife": { + "currentversion": "1.0.0" + } +} \ No newline at end of file