diff --git a/resources/Lux_ELS/client.lua b/resources/Lux_ELS/client.lua index ffef8296e..6d156f1b2 100644 --- a/resources/Lux_ELS/client.lua +++ b/resources/Lux_ELS/client.lua @@ -62,6 +62,9 @@ local eModelsWithFireSrn = "bat3", "e450ambo", "20ramambo", + "enforcerf", + "fireburb", + } diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/__resource.lua b/resources/[EGRP-CarPacks]/EGRP-Emergency/__resource.lua index fb5abf48b..2491387c5 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Emergency/__resource.lua +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/__resource.lua @@ -620,7 +620,20 @@ data_file 'CARCOLS_FILE' 'data/f450ambo/carcols.meta' data_file 'VEHICLE_VARIATION_FILE' 'data/f450ambo/carvariations.meta' data_file 'VEHICLE_LAYOUTS_FILE' 'data/f450ambo/dlctext.meta' + --enforcerf + files { + 'data/enforcerf/vehicles.meta', + 'data/enforcerf/carvariations.meta', + 'data/enforcerf/carcols.meta', + 'data/enforcerf/handling.meta', + 'data/enforcerf/vehiclelayouts.meta', +} +data_file 'HANDLING_FILE' 'data/enforcerf/handling.meta' +data_file 'VEHICLE_METADATA_FILE' 'data/enforcerf/vehicles.meta' +data_file 'CARCOLS_FILE' 'data/enforcerf/carcols.meta' +data_file 'VEHICLE_VARIATION_FILE' 'data/enforcerf/carvariations.meta' +data_file 'VEHICLE_LAYOUTS_FILE' 'data/enforcerf/dlctext.meta' client_script { 'vehicle_names.lua' diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/Leaked by NulledLeaks.net.url b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/Leaked by NulledLeaks.net.url new file mode 100644 index 000000000..bb1b5035d --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/Leaked by NulledLeaks.net.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://nulledleaks.net/index.php diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/carcols.meta b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/carcols.meta new file mode 100644 index 000000000..2daafff3a --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/carcols.meta @@ -0,0 +1,776 @@ + + + + + + enforcerf + + + + + + + VehicleLight_sirenlight + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/carvariations.meta b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/carvariations.meta new file mode 100644 index 000000000..477a531fe --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/carvariations.meta @@ -0,0 +1,155 @@ + + + + + + + enforcerf + + + + 0 + 0 + 156 + 156 + 0 + 0 + 67 + + + + + + + + + + + + + + + 0 + 0 + 156 + 156 + + + + + + + + + + + + + + + 0 + 0 + 156 + 156 + + + + + + + + + + + + + + + 0 + 0 + 156 + 156 + + + + + + + + + + + + + + + 0 + 0 + 156 + 156 + + + + + + + + + + + + + + + 0 + 0 + 156 + 156 + + + + + + + + + + + + + + + 37 + 37 + 37 + 37 + + + + + + + + + + + + + + + 0_default_modkit + + + + + + police guv plate + + + + + + + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/enforcer_sign_1.png b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/enforcer_sign_1.png new file mode 100644 index 000000000..0cf76292d Binary files /dev/null and b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/enforcer_sign_1.png differ diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/handling.meta b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/handling.meta new file mode 100644 index 000000000..d10bfd540 --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/handling.meta @@ -0,0 +1,104 @@ + + + + + enforcerf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 440010 + 0 + 0 + AVERAGE + + + + VEHICLE_WEAPON_WATER_CANNON + + + + + 0 + 0 + 0 + + + 3.000000 + 0.000000 + + + -0.400000 + 0.000000 + + + 0.707000 + 0.000000 + + + -0.500000 + 0.000000 + + + 0.000000 + 0.000000 + + + 25.000000 + 0.000000 + + + -0.080000 + 0.000000 + + + + + + + + + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/interior_regular_doors.png b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/interior_regular_doors.png new file mode 100644 index 000000000..3ff51118d Binary files /dev/null and b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/interior_regular_doors.png differ diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/vehicles.meta b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/vehicles.meta new file mode 100644 index 000000000..948943ffe --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/vehicles.meta @@ -0,0 +1,142 @@ + + + vehshare + + + + enforcerf + enforcerf + enforcerf + enforcerf + + null + null + null + null + + null + FIRETRUK + LAYOUT_FIRETRUCK + SHERIFF_COVER_OFFSET_INFO + EXPLOSION_INFO_DEFAULT + + DEFAULT_FOLLOW_VEHICLE_CAMERA + DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA + VEHICLE_BONNET_CAMERA_MID_HIGH + DEFAULT_POV_CAMERA + + + + + + + + + + + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_CAR_GENERIC + + + + + + + + + + + + + + + + + + + + + + 1500.000000 + 3000.000000 + 7000.000000 + 14000.000000 + 50000.000000 + 50000.000000 + + + + + + + + + + + SWANKNESS_4 + + FLAG_BIG FLAG_HAS_LIVERY FLAG_EXTRAS_STRONG FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_HAS_INTERIOR_EXTRAS FLAG_DONT_SPAWN_AS_AMBIENT + VEHICLE_TYPE_CAR + VPT_FRONT_AND_BACK_PLATES + VDT_BANSHEE + VC_EMERGENCY + VWT_MUSCLE + + + + S_M_Y_Cop_01 + + + + + EXTRA_1 + + + + + + EXTRA_1 + + REWARD_STAT_WEAPON + + + WHEEL_FRONT_RIGHT_CAMERA + WHEEL_FRONT_LEFT_CAMERA + WHEEL_REAR_RIGHT_CAMERA + WHEEL_REAR_LEFT_CAMERA + + + + + + + STD_POLICE_FRONT_LEFT + STD_POLICE_FRONT_RIGHT + STD_POLICE_REAR_LEFT + STD_POLICE_REAR_RIGHT + + + + + + vehicles_banshee_interior + enforcerf + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/windows_template.png b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/windows_template.png new file mode 100644 index 000000000..5088d0683 Binary files /dev/null and b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/enforcerf/windows_template.png differ diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf.yft b/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf.yft new file mode 100644 index 000000000..b1ad6a7ae --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:615a6982ecccfa525c55476ec46169023ef015039d84406527a37d952b803019 +size 8604616 diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf.ytd b/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf.ytd new file mode 100644 index 000000000..b6cb5500d --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ebba671102477ae8dcb8b6043b1f98d3d9c9e44a900e97ef37d868e5518f225 +size 7578657 diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf_hi.yft b/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf_hi.yft new file mode 100644 index 000000000..ebd4bf87d --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/stream/enforcerf/enforcerf_hi.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abdfaa3c15040c2f34f93840f35412e6204177ec54b7d7651ea51e294b0d82f7 +size 8604521 diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/vehicle_names.lua b/resources/[EGRP-CarPacks]/EGRP-Emergency/vehicle_names.lua index 3b11fb87f..8919515fc 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Emergency/vehicle_names.lua +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/vehicle_names.lua @@ -179,7 +179,8 @@ Citizen.CreateThread(function() -- swatsubrb AddTextEntry('swatsubrb', 'Chevy Suburban 2021') -- f450ambo - AddTextEntry('f450ambo', 'Ford F450ambo 2021') - + AddTextEntry('f450ambo', 'Ford Ambulance f450 2020') + -- enforcerf + AddTextEntry('enforcerf ', 'Pierce enforcerf Pumper Tanker 2020') end) \ No newline at end of file diff --git a/resources/cummins5924v/audioconfig/cummins5924v_game.dat151.rel b/resources/cummins5924v/audioconfig/cummins5924v_game.dat151.rel new file mode 100644 index 000000000..40b1e9c10 Binary files /dev/null and b/resources/cummins5924v/audioconfig/cummins5924v_game.dat151.rel differ diff --git a/resources/cummins5924v/audioconfig/cummins5924v_sounds.dat54.rel b/resources/cummins5924v/audioconfig/cummins5924v_sounds.dat54.rel new file mode 100644 index 000000000..5bdcf431f Binary files /dev/null and b/resources/cummins5924v/audioconfig/cummins5924v_sounds.dat54.rel differ diff --git a/resources/cummins5924v/fxmanifest.lua b/resources/cummins5924v/fxmanifest.lua new file mode 100644 index 000000000..a9c38857c --- /dev/null +++ b/resources/cummins5924v/fxmanifest.lua @@ -0,0 +1,14 @@ +fx_version 'adamant' + +game 'gta5' + +files { + 'audioconfig/cummins5924v_game.dat151.rel', + 'audioconfig/cummins5924v_sounds.dat54.rel', + 'sfx/dlc_cummins5924v/cummins5924v.awc', + 'sfx/dlc_cummins5924v/cummins5924v_npc.awc' +} + +data_file 'AUDIO_GAMEDATA' 'audioconfig/cummins5924v_game.dat' +data_file 'AUDIO_SOUNDDATA' 'audioconfig/cummins5924v_sounds.dat' +data_file 'AUDIO_WAVEPACK' 'sfx/dlc_cummins5924v' \ No newline at end of file diff --git a/resources/cummins5924v/sfx/dlc_cummins5924v/cummins5924v.awc b/resources/cummins5924v/sfx/dlc_cummins5924v/cummins5924v.awc new file mode 100644 index 000000000..36fe73f66 Binary files /dev/null and b/resources/cummins5924v/sfx/dlc_cummins5924v/cummins5924v.awc differ diff --git a/resources/cummins5924v/sfx/dlc_cummins5924v/cummins5924v_npc.awc b/resources/cummins5924v/sfx/dlc_cummins5924v/cummins5924v_npc.awc new file mode 100644 index 000000000..3848303cc Binary files /dev/null and b/resources/cummins5924v/sfx/dlc_cummins5924v/cummins5924v_npc.awc differ diff --git a/resources/stretcher/__resource.lua b/resources/stretcher/__resource.lua new file mode 100644 index 000000000..ca6708038 --- /dev/null +++ b/resources/stretcher/__resource.lua @@ -0,0 +1,18 @@ +resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5' + +-- Leaked By: Leaking Hub | Joshua Y. | https://discord.gg/aXWXXst + +files { + 'vehicles.meta', + 'carvariations.meta', + 'carcols.meta', + 'handling.meta', + 'vehiclelayouts.meta', + 'vehiclelayouts.meta', +} + +data_file 'HANDLING_FILE' 'handling.meta' +data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta' +data_file 'CARCOLS_FILE' 'carcols.meta' +data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta' +data_file 'VEHICLE_LAYOUTS_FILE' 'vehiclelayouts.meta' diff --git a/resources/stretcher/stream/stretcher.yft b/resources/stretcher/stream/stretcher.yft new file mode 100644 index 000000000..1f5e6cd82 --- /dev/null +++ b/resources/stretcher/stream/stretcher.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa25eb463f170b0da8d872249781e33863d0a5f20534ff6acb1e1556f59ea1bf +size 1015267 diff --git a/resources/stretcher/stream/stretcher.ytd b/resources/stretcher/stream/stretcher.ytd new file mode 100644 index 000000000..22b8e9557 --- /dev/null +++ b/resources/stretcher/stream/stretcher.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5735eefc8762661f4aec7332beeb589b068d6d24aee878007958ac28976fd69e +size 28035 diff --git a/resources/stretcher/stream/stretcher_hi.yft b/resources/stretcher/stream/stretcher_hi.yft new file mode 100644 index 000000000..a5ab53099 --- /dev/null +++ b/resources/stretcher/stream/stretcher_hi.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be6c6a925d0adec96ed0bb0969a0b0ec43302c21e3a5fa505dfbd4d4f48d0b90 +size 1015281 diff --git a/resources/stretcher/vehicles.meta b/resources/stretcher/vehicles.meta new file mode 100644 index 000000000..cb15af048 --- /dev/null +++ b/resources/stretcher/vehicles.meta @@ -0,0 +1,117 @@ + + + vehshare + + + + stretcher + stretcher + RUMPO + stretcher + BRAVADO + null + null + null + null + + null + + LAYOUT_VAN + RUMPO_COVER_OFFSET_INFO + EXPLOSION_INFO_DEFAULT + + DEFAULT_FOLLOW_VEHICLE_CAMERA + DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA + VEHICLE_BONNET_CAMERA_LOW + DEFAULT_POV_CAMERA_LOOKAROUND_MID + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_CAR_GENERIC + + + + + + + + + + + + + + + + + + + + + + 15.000000 + 35.000000 + 70.000000 + 140.000000 + 500.000000 + 500.000000 + + + + + + + + + + + SWANKNESS_1 + + FLAG_SMALL_WORKER FLAG_IS_VAN FLAG_DELIVERY FLAG_EXTRAS_ALL FLAG_AVERAGE_CAR FLAG_POOR_CAR FLAG_IS_BULKY + VEHICLE_TYPE_CAR + VPT_BACK_PLATES + VDT_TRUCK + VC_VAN + VWT_MUSCLE + + + + + + + + + + + + WHEEL_FRONT_RIGHT_CAMERA + WHEEL_FRONT_LEFT_CAMERA + WHEEL_REAR_RIGHT_CAMERA + WHEEL_REAR_LEFT_CAMERA + + + + + + + RANGER_RANCHERXL_FRONT_LEFT + VAN_RUMPO_FRONT_RIGHT + + + + + diff --git a/resources/stretcherscript/client/main.lua b/resources/stretcherscript/client/main.lua new file mode 100644 index 000000000..70dfebe09 --- /dev/null +++ b/resources/stretcherscript/client/main.lua @@ -0,0 +1,297 @@ +local lit_1 = { + {anim = "savecouch@",lib = "t_sleep_loop_couch",name = Config.Language.anim.lie_back, x = 0, y = 0, z = 1.1, r = 180.0}, + {anim = "amb@prop_human_seat_chair_food@male@base",lib = "base",name = Config.Language.anim.sit_right, x = 0.0, y = -0.2, z =0.55, r = -90.0}, + {anim = "amb@prop_human_seat_chair_food@male@base",lib = "base",name = Config.Language.anim.sit_left, x = 0.0, y = -0.2, z =0.55, r = 90.0}, + -- {anim = "missheistfbi3b_ig8_2",lib = "cpr_loop_victim",name = Config.Language.anim.convulse, x = 0.0, y = 0.0, z = 1.5, r = 175.0}, + {anim = "amb@world_human_bum_slumped@male@laying_on_right_side@base",lib = "base",name = Config.Language.anim.pls, x = 0.2, y = 0.1, z = 1.6, r = 100.0}, +} + +local labels = { + { "REDNECK_AMBO_HELP", "Press ~INPUT_CONTEXT~ to open/close back doors.~n~Press ~INPUT_HUD_SPECIAL~ to extend power-load." }, + { "REDNECK_AMBO_HELP2", "Press ~INPUT_CONTEXT~ to open/close back doors.~n~Press ~INPUT_DETONATE~ to take stretcher.~n~Press ~INPUT_HUD_SPECIAL~ to extend power-load." }, + { "REDNECK_AMBO_HELP3", "Press ~INPUT_CONTEXT~ to open/close back doors.~n~Press ~INPUT_DETONATE~ to stow stretcher.~n~Press ~INPUT_HUD_SPECIAL~ to extend power-load." } +} + +local lit = { + {lit = "stretcher", distance_stop = 2.4, name = lit_1, title = Config.Language.lit_1} +} + +prop_amb = false +veh_detect = 0 + +Citizen.CreateThread(function() + + for i = 1, #labels do + AddTextEntry(labels[i][1], labels[i][2]) + end + + WarMenu.CreateMenu('hopital', ' ') + WarMenu.SetTitleColor('hopital', 255, 255, 255, 255) + WarMenu.SetMenuTextColor('hopital', 255, 255, 255, 255) + WarMenu.SetMenuSubTextColor('hopital', 255, 255, 255, 255) + WarMenu.SetMenuFocusColor('hopital', 255, 255, 255, 255) + WarMenu.SetTitleBackgroundSprite('hopital', 'redneckmods', 'banner') + while true do + local sleep = 2000 + local pedCoords = GetEntityCoords(PlayerPedId()) + for _,i in pairs(lit) do + local closestObject = GetClosestVehicle(pedCoords, 3.0, GetHashKey("stretcher"), 70) + + if DoesEntityExist(closestObject) then + sleep = 5 + local propCoords = GetEntityCoords(closestObject) + local propForward = GetEntityForwardVector(closestObject) + local litCoords = (propCoords + propForward) + local sitCoords = (propCoords + propForward * 0.1) + local pickupCoords = (propCoords + propForward * 1.2) + local pickupCoords2 = (propCoords + propForward * - 1.2) + + if GetDistanceBetweenCoords(pedCoords, litCoords, true) <= 5.0 then + if GetDistanceBetweenCoords(pedCoords, sitCoords, true) <= 2.0 and not IsEntityPlayingAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 3) then + hintToDisplay(Config.Language.do_action) + if IsControlJustPressed(0, Config.Press.do_action) then + WarMenu.OpenMenu('hopital') + end + elseif IsEntityAttachedToEntity(closestObject, PlayerPedId()) == false and not IsEntityPlayingAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 3) then + if GetDistanceBetweenCoords(pedCoords, pickupCoords, true) <= 2.0 then + hintToDisplay(Config.Language.take_bed) + -- DrawText3D(0,0,0, Config.language.take_bed, -- waaaaaaa) + if IsControlJustPressed(0, Config.Press.take_bed) then + SetVehicleExtra(closestObject, 1, 0) + SetVehicleExtra(closestObject, 2, 1) + prendre(closestObject) + end + end + + if GetDistanceBetweenCoords(pedCoords, pickupCoords2, true) <= 1.5 and prop_amb == true then + CancelEvent() + else + hintToDisplay(Config.Language.take_bed) + if IsControlJustPressed(0, Config.Press.take_bed) then + SetVehicleExtra(closestObject, 1, 0) + SetVehicleExtra(closestObject, 2, 1) + prendre(closestObject) + end + end + end + end + + if WarMenu.IsMenuOpened('hopital') then + for _,k in pairs(i.name) do + if WarMenu.Button(k.name) then + LoadAnim(k.anim) + AttachEntityToEntity(PlayerPedId(), closestObject, PlayerPedId(), k.x, k.y, k.z, 0.0, 0.0, k.r, 0.0, false, false, false, false, 2, true) + TaskPlayAnim(PlayerPedId(), k.anim, k.lib, 8.0, 8.0, -1, 1, 0, false, false, false) + end + end + + if WarMenu.Button(Config.Language.toggle_seat) then + if IsVehicleDoorFullyOpen(closestObject, 4) == false then + SetVehicleDoorOpen(closestObject, 4, false) + else + SetVehicleDoorShut(closestObject, 4, false) + end + end + + if WarMenu.Button(Config.Language.go_out_bed) then + DetachEntity(PlayerPedId(), true, true) + local x, y, z = table.unpack(GetEntityCoords(closestObject) + GetEntityForwardVector(closestObject) * - i.distance_stop) + SetEntityCoords(PlayerPedId(), x, y, z) + end + + if WarMenu.Button('Close Menu') then + WarMenu.CloseMenu('hopital') + end + WarMenu.Display() + end + end + end + Citizen.Wait(sleep) + end +end) + +-- Leaked By: Leaking Hub | Joshua Y. | https://discord.gg/aXWXXst + +Citizen.CreateThread(function() + prop_exist = 0 + while true do + for _,g in pairs(Config.Hash) do + local closestObject = GetClosestVehicle(GetEntityCoords(PlayerPedId()), 7.0, GetHashKey(g.hash), 18) + if closestObject ~= 0 then + veh_detect = closestObject + veh_detection = g.detection + prop_depth = g.depth + prop_height = g.height + end + end + if prop_amb == false then + if GetVehiclePedIsIn(PlayerPedId()) == 0 then + if DoesEntityExist(veh_detect) then + local coords = GetEntityCoords(veh_detect) + GetEntityForwardVector(veh_detect) * - veh_detection + local coords_spawn = GetEntityCoords(veh_detect) + GetEntityForwardVector(veh_detect) * - (veh_detection + 4.0) + if GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), coords.x , coords.y, coords.z, true) <= 5.0 then + if not IsEntityPlayingAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 3) and not IsEntityAttachedToAnyVehicle(PlayerPedId()) then + BeginTextCommandDisplayHelp(labels[1][1]) + EndTextCommandDisplayHelp(0, 0, 1, -1) + for _,m in pairs(lit) do + local prop = GetClosestObjectOfType(GetEntityCoords(PlayerPedId()), 4.0, GetHashKey(m.lit)) + if prop ~= 0 then + prop_exist = prop + end + end + if IsEntityAttachedToEntity(prop, PlayerPedId()) ~= 0 or prop ~= 0 then + if IsControlJustPressed(0, Config.Press.out_vehicle_bed) then + if IsVehicleDoorFullyOpen(veh_detect, 5) then + SetVehicleDoorShut(veh_detect, 5, false) + else + SetVehicleDoorOpen(veh_detect, 5, false) + end + end + if IsControlJustPressed(0, Config.Press.extend_powerload) then + if IsVehicleDoorFullyOpen(veh_detect, 4) then + SetVehicleDoorShut(veh_detect, 4, false) + else + SetVehicleDoorOpen(veh_detect, 4, false) + end + end + end + end + end + end + end + end + Citizen.Wait(0) + end +end) + +function prendre(propObject, hash) + NetworkRequestControlOfEntity(propObject) + + LoadAnim("anim@heists@box_carry@") + + AttachEntityToEntity(propObject, PlayerPedId(), PlayerPedId(), -0.05, 1.3, -0.4 , 180.0, 180.0, 180.0, 0.0, false, false, false, false, 2, true) + + while IsEntityAttachedToEntity(propObject, PlayerPedId()) do + + Citizen.Wait(5) + + if not IsEntityPlayingAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 3) then + TaskPlayAnim(PlayerPedId(), 'anim@heists@box_carry@', 'idle', 8.0, 8.0, -1, 50, 0, false, false, false) + end + + if IsPedDeadOrDying(PlayerPedId()) then + ClearPedTasksImmediately(PlayerPedId()) + SetVehicleExtra(propObject, 1, 1) + SetVehicleExtra(propObject, 2, 0) + DetachEntity(propObject, true, true) + end + if GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), GetEntityCoords(veh_detect), true) <= 9.0 then + --hintToDisplay(Config.Language.in_vehicle_bed) + BeginTextCommandDisplayHelp(labels[3][1]) + EndTextCommandDisplayHelp(0, 0, 1, -1) + if IsControlJustPressed(0, 47) then + ClearPedTasksImmediately(PlayerPedId()) + SetVehicleExtra(propObject, 1, 1) + SetVehicleExtra(propObject, 2, 0) + DetachEntity(propObject, true, true) + prop_amb = true + in_ambulance(propObject, veh_detect, prop_depth, prop_height) + end + if IsControlJustPressed(0, Config.Press.open_close_doors) then + if IsVehicleDoorFullyOpen(veh_detect, 5) then + SetVehicleDoorShut(veh_detect, 5, false) + else + SetVehicleDoorOpen(veh_detect, 5, false) + end + end + if IsControlJustPressed(0, Config.Press.extend_powerload) then + if IsVehicleDoorFullyOpen(veh_detect, 4) then + SetVehicleDoorShut(veh_detect, 4, false) + else + SetVehicleDoorOpen(veh_detect, 4, false) + end + end + else + hintToDisplay(Config.Language.release_bed) + end + + if IsControlJustPressed(0, Config.Press.release_bed) then + ClearPedTasksImmediately(PlayerPedId()) + SetVehicleExtra(propObject, 1, 1) + SetVehicleExtra(propObject, 2, 0) + DetachEntity(propObject, true, false) + SetVehicleOnGroundProperly(propObject) + end + + end +end + +function in_ambulance(propObject, amb, depth, height) + veh_detect = 0 + NetworkRequestControlOfEntity(amb) + + AttachEntityToEntity(propObject, amb, GetEntityBoneIndexByName(amb, "bonnet"), 0.0, depth, height, 0.0, 0.0, 0.0, 0.0, false, false, true, false, 2, true) + + while IsEntityAttachedToEntity(propObject, amb) do + Citizen.Wait(5) + + if GetVehiclePedIsIn(PlayerPedId()) == 0 then + if GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), GetEntityCoords(amb), true) <= 7.0 then + BeginTextCommandDisplayHelp(labels[2][1]) + EndTextCommandDisplayHelp(0, 0, 1, -1) + if IsControlJustPressed(0, Config.Press.take_stow_stretcher) then + DetachEntity(propObject, true, true) + prop_amb = false + SetEntityHeading(PlayerPedId(), GetEntityHeading(PlayerPedId()) - 180.0) + SetVehicleExtra(propObject, 1, 0) + SetVehicleExtra(propObject, 2, 1) + prendre(propObject) + end + if IsControlJustPressed(0, Config.Press.out_vehicle_bed) then + if IsVehicleDoorFullyOpen(amb, 5) then + SetVehicleDoorShut(amb, 5, false) + else + SetVehicleDoorOpen(amb, 5, false) + end + end + if IsControlJustPressed(0, Config.Press.extend_powerload) then + if IsVehicleDoorFullyOpen(amb, 4) then + SetVehicleDoorShut(amb, 4, false) + else + SetVehicleDoorOpen(amb, 4, false) + end + end + end + end + end +end + +function LoadAnim(dict) + while not HasAnimDictLoaded(dict) do + RequestAnimDict(dict) + Citizen.Wait(1) + end +end + +function hintToDisplay(text) + BeginTextCommandDisplayHelp("STRING") + AddTextComponentString(text) + DisplayHelpTextFromStringLabel(0, 0, 1, -1) +end + +function DrawText3D(coords, text, size) + + local onScreen,_x,_y=World3dToScreen2d(coords.x,coords.y,coords.z + 1.0) + local px,py,pz=table.unpack(GetGameplayCamCoords()) + + SetTextScale(0.35, 0.35) + SetTextFont(4) + SetTextProportional(1) + SetTextColour(255, 255, 255, 215) + SetTextEntry("STRING") + SetTextCentre(1) + AddTextComponentString(text) + DrawText(_x,_y) + local factor = (string.len(text)) / 370 + DrawRect(_x,_y+0.0125, 0.015+ factor, 0.03, 41, 11, 41, 68) +end \ No newline at end of file diff --git a/resources/stretcherscript/config.lua b/resources/stretcherscript/config.lua new file mode 100644 index 000000000..84944aded --- /dev/null +++ b/resources/stretcherscript/config.lua @@ -0,0 +1,55 @@ +local Keys = { + ["ESC"] = 322, ["F1"] = 288, ["F2"] = 289, ["F3"] = 170, ["F5"] = 166, ["F6"] = 167, ["F7"] = 168, ["F8"] = 169, ["F9"] = 56, ["F10"] = 57, + ["~"] = 243, ["1"] = 157, ["2"] = 158, ["3"] = 160, ["4"] = 164, ["5"] = 165, ["6"] = 159, ["7"] = 161, ["8"] = 162, ["9"] = 163, ["-"] = 84, ["="] = 83, ["BACKSPACE"] = 177, + ["TAB"] = 37, ["Q"] = 44, ["W"] = 32, ["E"] = 38, ["R"] = 45, ["T"] = 245, ["Y"] = 246, ["U"] = 303, ["P"] = 199, ["["] = 39, ["]"] = 40, ["ENTER"] = 18, + ["CAPS"] = 137, ["A"] = 34, ["S"] = 8, ["D"] = 9, ["F"] = 23, ["G"] = 47, ["H"] = 74, ["K"] = 311, ["L"] = 182, + ["LEFTSHIFT"] = 21, ["Z"] = 20, ["X"] = 73, ["C"] = 26, ["V"] = 0, ["B"] = 29, ["N"] = 249, ["M"] = 244, [","] = 82, ["."] = 81, + ["LEFTCTRL"] = 36, ["LEFTALT"] = 19, ["SPACE"] = 22, ["RIGHTCTRL"] = 70, + ["HOME"] = 213, ["PAGEUP"] = 10, ["PAGEDOWN"] = 11, ["DELETE"] = 178, + ["LEFT"] = 174, ["RIGHT"] = 175, ["TOP"] = 27, ["DOWN"] = 173, + ["NENTER"] = 201, ["N4"] = 108, ["N5"] = 60, ["N6"] = 107, ["N+"] = 96, ["N-"] = 97, ["N7"] = 117, ["N8"] = 61, ["N9"] = 118 +} + +Config = {} +Config.OpenMenuSpawn= {x = 266.62, y = -1354.23, z = 24.53} + +Config.Hash = { + {hash = "f450ambo", detection = 2.4, depth = -1.0, height = 0.0}, +} + +Config.Press = { + open_menu = Keys["Y"], + take_bed = Keys["E"], + do_action = Keys["E"], + out_vehicle_bed = Keys["E"], + release_bed = Keys["B"], + in_vehicle_bed = Keys["E"], + go_out_bed = Keys["E"], + open_close_doors = Keys["E"], + extend_powerload = Keys["Z"], + take_stow_stretcher = Keys["G"], +} + + +Config.Language = { + name_hospital = 'Stretcher', + open_menu = 'Press ~b~E', + do_action = 'Press ~INPUT_CONTEXT~ to interact with stretcher', + take_bed = "Press ~INPUT_CONTEXT~ to take stretcher", + release_bed = "Press ~INPUT_SPECIAL_ABILITY_SECONDARY~ to drop stretcher", + in_vehicle_bed = "Press ~INPUT_CONTEXT~ to stow stretcher", + out_vehicle_bed = "Press ~INPUT_CONTEXT~ to retrieve stretcher", + go_out_bed = "Get Out of Bed", + delete_bed = "Remove Bed", + toggle_backboard = "Toggle Backboard", + toggle_seat = "Toggle Headrest", + lit_1 = "Bed without matela", + anim = { + spawn_command = "Litter", + lie_back = "Lie on back", + sit_right = "Sit on the right side", + sit_left = "Sit on left side", + convulse = "Recieve CPR", + pls = "Lay sideways", + } +} \ No newline at end of file diff --git a/resources/stretcherscript/fxmanifest.lua b/resources/stretcherscript/fxmanifest.lua new file mode 100644 index 000000000..da639ff49 --- /dev/null +++ b/resources/stretcherscript/fxmanifest.lua @@ -0,0 +1,10 @@ +fx_version 'adamant' +game 'gta5' + +-- Leaked By: Leaking Hub | Joshua Y. | https://discord.gg/aXWXXst + +client_scripts { + 'warmenu.lua', + 'config.lua', + 'client/main.lua' +} diff --git a/resources/stretcherscript/stream/redneckmods.ytd b/resources/stretcherscript/stream/redneckmods.ytd new file mode 100644 index 000000000..abb2deae4 --- /dev/null +++ b/resources/stretcherscript/stream/redneckmods.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59b2c261c2f2e5962806f9de39041fae9f31726be032f5908399e67e70822051 +size 9623 diff --git a/resources/stretcherscript/warmenu.lua b/resources/stretcherscript/warmenu.lua new file mode 100644 index 000000000..cea5f3b90 --- /dev/null +++ b/resources/stretcherscript/warmenu.lua @@ -0,0 +1,523 @@ +WarMenu = { } + +WarMenu.debug = false + + +local menus = { } +local keys = { up = 188, down = 187, left = 189, right = 190, select = 201, back = 202 } +local optionCount = 0 + +local currentKey = nil +local currentMenu = nil + +local titleHeight = 0.11 +local titleYOffset = 0.03 +local titleScale = 1.0 + +local buttonHeight = 0.038 +local buttonFont = 0 +local buttonScale = 0.365 +local buttonTextXOffset = 0.005 +local buttonTextYOffset = 0.005 + + +local function debugPrint(text) + if WarMenu.debug then + Citizen.Trace('[WarMenu] '..tostring(text)) + end +end + + +local function setMenuProperty(id, property, value) + if id and menus[id] then + menus[id][property] = value + debugPrint(id..' menu property changed: { '..tostring(property)..', '..tostring(value)..' }') + end +end + + +local function isMenuVisible(id) + if id and menus[id] then + return menus[id].visible + else + return false + end +end + + +local function setMenuVisible(id, visible, holdCurrent) + if id and menus[id] then + setMenuProperty(id, 'visible', visible) + + if not holdCurrent and menus[id] then + setMenuProperty(id, 'currentOption', 1) + end + + if visible then + if id ~= currentMenu and isMenuVisible(currentMenu) then + setMenuVisible(currentMenu, false) + end + + currentMenu = id + end + end +end + + +local function drawText(text, x, y, font, color, scale, center, shadow, alignRight) + SetTextColour(color.r, color.g, color.b, color.a) + SetTextFont(font) + SetTextScale(scale, scale) + + if shadow then + SetTextDropShadow(2, 2, 0, 0, 0) + end + + local menu = menus[currentMenu] + if menu then + if center then + SetTextCentre(center) + elseif alignRight then + SetTextWrap(menu.x, menu.x + menu.width - buttonTextXOffset) + SetTextRightJustify(true) + end + end + + BeginTextCommandDisplayText("STRING") + AddTextComponentSubstringPlayerName(tostring(text)) + EndTextCommandDisplayText(x, y) +end + + +local function drawRect(x, y, width, height, color) + DrawRect(x, y, width, height, color.r, color.g, color.b, color.a) +end + + +local function drawTitle() + local menu = menus[currentMenu] + if menu then + local x = menu.x + menu.width / 2 + local y = menu.y + titleHeight / 2 + + if menu.titleBackgroundSprite then + DrawSprite(menu.titleBackgroundSprite.dict, menu.titleBackgroundSprite.name, x, y, menu.width, titleHeight, 0., 255, 255, 255, 255) + else + drawRect(x, y, menu.width, titleHeight, menu.titleBackgroundColor) + end + + drawText(menu.title, x, y - titleHeight / 2 + titleYOffset, menu.titleFont, menu.titleColor, titleScale, true) + end +end + + +local function drawSubTitle() + local menu = menus[currentMenu] + if menu then + local x = menu.x + menu.width / 2 + local y = menu.y + titleHeight + buttonHeight / 2 + + local subTitleColor = { r = menu.titleBackgroundColor.r, g = menu.titleBackgroundColor.g, b = menu.titleBackgroundColor.b, a = 255 } + + drawRect(x, y, menu.width, buttonHeight, menu.subTitleBackgroundColor) + drawText(menu.subTitle, menu.x + buttonTextXOffset, y - buttonHeight / 2 + buttonTextYOffset, buttonFont, subTitleColor, buttonScale, false) + + if optionCount > menu.maxOptionCount then + drawText(tostring(menu.currentOption)..' / '..tostring(optionCount), menu.x + menu.width, y - buttonHeight / 2 + buttonTextYOffset, buttonFont, subTitleColor, buttonScale, false, false, true) + end + end +end + + +local function drawButton(text, subText) + local menu = menus[currentMenu] + + local x = menu.x + menu.width / 2 + local multiplier = nil + + if menu.currentOption <= menu.maxOptionCount and optionCount <= menu.maxOptionCount then + multiplier = optionCount + elseif optionCount > menu.currentOption - menu.maxOptionCount and optionCount <= menu.currentOption then + multiplier = optionCount - (menu.currentOption - menu.maxOptionCount) + end + + if multiplier then + local y = menu.y + titleHeight + buttonHeight + (buttonHeight * multiplier) - buttonHeight / 2 + local backgroundColor = nil + local textColor = nil + local subTextColor = nil + local shadow = false + + if menu.currentOption == optionCount then + backgroundColor = menu.menuFocusBackgroundColor + textColor = menu.menuFocusTextColor + subTextColor = menu.menuFocusTextColor + else + backgroundColor = menu.menuBackgroundColor + textColor = menu.menuTextColor + subTextColor = menu.menuSubTextColor + shadow = true + end + + drawRect(x, y, menu.width, buttonHeight, backgroundColor) + drawText(text, menu.x + buttonTextXOffset, y - (buttonHeight / 2) + buttonTextYOffset, buttonFont, textColor, buttonScale, false, shadow) + + if subText then + drawText(subText, menu.x + buttonTextXOffset, y - buttonHeight / 2 + buttonTextYOffset, buttonFont, subTextColor, buttonScale, false, shadow, true) + end + end +end + + +function WarMenu.CreateMenu(id, title) + -- Default settings + menus[id] = { } + menus[id].title = title + menus[id].subTitle = 'Select an option.' + + menus[id].visible = false + + menus[id].previousMenu = nil + + menus[id].aboutToBeClosed = false + + menus[id].x = 0.0175 + menus[id].y = 0.280 + menus[id].width = 0.23 + + menus[id].currentOption = 1 + menus[id].maxOptionCount = 10 + + menus[id].titleFont = 1 + menus[id].titleColor = { r = 0, g = 0, b = 0, a = 255 } + menus[id].titleBackgroundColor = { r = 255, g = 255, b = 255, a = 255 } + menus[id].titleBackgroundSprite = nil + + menus[id].menuTextColor = { r = 255, g = 255, b = 255, a = 255 } + menus[id].menuSubTextColor = { r = 255, g = 255, b = 255, a = 255 } + menus[id].menuFocusTextColor = { r = 0, g = 0, b = 0, a = 255 } + menus[id].menuFocusBackgroundColor = { r = 245, g = 245, b = 245, a = 255 } + menus[id].menuBackgroundColor = { r = 0, g = 0, b = 0, a = 160 } + + menus[id].subTitleBackgroundColor = { r = menus[id].menuBackgroundColor.r, g = menus[id].menuBackgroundColor.g, b = menus[id].menuBackgroundColor.b, a = 255 } + + menus[id].buttonPressedSound = { name = "SELECT", set = "HUD_FRONTEND_DEFAULT_SOUNDSET" } --https://pastebin.com/0neZdsZ5 + + debugPrint(tostring(id)..' menu created') +end + + +function WarMenu.CreateSubMenu(id, parent, subTitle) + if menus[parent] then + WarMenu.CreateMenu(id, menus[parent].title) + + if subTitle then + setMenuProperty(id, 'subTitle', string.upper(subTitle)) + else + setMenuProperty(id, 'subTitle', string.upper(menus[parent].subTitle)) + end + + setMenuProperty(id, 'previousMenu', parent) + + setMenuProperty(id, 'x', menus[parent].x) + setMenuProperty(id, 'y', menus[parent].y) + setMenuProperty(id, 'maxOptionCount', menus[parent].maxOptionCount) + setMenuProperty(id, 'titleFont', menus[parent].titleFont) + setMenuProperty(id, 'titleColor', menus[parent].titleColor) + setMenuProperty(id, 'titleBackgroundColor', menus[parent].titleBackgroundColor) + setMenuProperty(id, 'titleBackgroundSprite', menus[parent].titleBackgroundSprite) + setMenuProperty(id, 'menuTextColor', menus[parent].menuTextColor) + setMenuProperty(id, 'menuSubTextColor', menus[parent].menuSubTextColor) + setMenuProperty(id, 'menuFocusTextColor', menus[parent].menuFocusTextColor) + setMenuProperty(id, 'menuFocusBackgroundColor', menus[parent].menuFocusBackgroundColor) + setMenuProperty(id, 'menuBackgroundColor', menus[parent].menuBackgroundColor) + setMenuProperty(id, 'subTitleBackgroundColor', menus[parent].subTitleBackgroundColor) + else + debugPrint('Failed to create '..tostring(id)..' submenu: '..tostring(parent)..' parent menu doesn\'t exist') + end +end + + +function WarMenu.CurrentMenu() + return currentMenu +end + + +function WarMenu.OpenMenu(id) + if id and menus[id] then + PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", true) + setMenuVisible(id, true) + debugPrint(tostring(id)..' menu opened') + else + debugPrint('Failed to open '..tostring(id)..' menu: it doesn\'t exist') + end +end + + +function WarMenu.IsMenuOpened(id) + return isMenuVisible(id) +end + + +function WarMenu.IsAnyMenuOpened() + for id, _ in pairs(menus) do + if isMenuVisible(id) then return true end + end + + return false +end + + +function WarMenu.IsMenuAboutToBeClosed() + local menu = menus[currentMenu] + if menu then + return menu.aboutToBeClosed + else + return false + end +end + + +function WarMenu.CloseMenu() + local menu = menus[currentMenu] + if menu then + if menu.aboutToBeClosed then + menu.aboutToBeClosed = false + setMenuVisible(currentMenu, false) + debugPrint(tostring(currentMenu)..' menu closed') + PlaySoundFrontend(-1, "QUIT", "HUD_FRONTEND_DEFAULT_SOUNDSET", true) + optionCount = 0 + currentMenu = nil + currentKey = nil + else + menu.aboutToBeClosed = true + debugPrint(tostring(currentMenu)..' menu about to be closed') + end + end +end + + +function WarMenu.Button(text, subText) + local buttonText = text + if subText then + buttonText = '{ '..tostring(buttonText)..', '..tostring(subText)..' }' + end + + local menu = menus[currentMenu] + if menu then + optionCount = optionCount + 1 + + local isCurrent = menu.currentOption == optionCount + + drawButton(text, subText) + + if isCurrent then + if currentKey == keys.select then + PlaySoundFrontend(-1, menu.buttonPressedSound.name, menu.buttonPressedSound.set, true) + debugPrint(buttonText..' button pressed') + return true + elseif currentKey == keys.left or currentKey == keys.right then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", true) + end + end + + return false + else + debugPrint('Failed to create '..buttonText..' button: '..tostring(currentMenu)..' menu doesn\'t exist') + + return false + end +end + + +function WarMenu.MenuButton(text, id, subText) + if menus[id] then + if WarMenu.Button(text, subText) then + setMenuVisible(currentMenu, false) + setMenuVisible(id, true, true) + + return true + end + else + debugPrint('Failed to create '..tostring(text)..' menu button: '..tostring(id)..' submenu doesn\'t exist') + end + + return false +end + + +function WarMenu.CheckBox(text, checked, callback) + if WarMenu.Button(text, checked and 'On' or 'Off') then + checked = not checked + debugPrint(tostring(text)..' checkbox changed to '..tostring(checked)) + if callback then callback(checked) end + + return true + end + + return false +end + + +function WarMenu.ComboBox(text, items, currentIndex, selectedIndex, callback) + local itemsCount = #items + local selectedItem = items[currentIndex] + local isCurrent = menus[currentMenu].currentOption == (optionCount + 1) + + if itemsCount > 1 and isCurrent then + selectedItem = '← '..tostring(selectedItem)..' →' + end + + if WarMenu.Button(text, selectedItem) then + selectedIndex = currentIndex + callback(currentIndex, selectedIndex) + return true + elseif isCurrent then + if currentKey == keys.left then + if currentIndex > 1 then currentIndex = currentIndex - 1 else currentIndex = itemsCount end + elseif currentKey == keys.right then + if currentIndex < itemsCount then currentIndex = currentIndex + 1 else currentIndex = 1 end + end + else + currentIndex = selectedIndex + end + + callback(currentIndex, selectedIndex) + return false +end + + +function WarMenu.Display() + if isMenuVisible(currentMenu) then + DisableControlAction(0, keys.left, true) + DisableControlAction(0, keys.up, true) + DisableControlAction(0, keys.down, true) + DisableControlAction(0, keys.right, true) + DisableControlAction(0, keys.back, true) + DisableControlAction(0, keys.select, true) + + local menu = menus[currentMenu] + + if menu.aboutToBeClosed then + WarMenu.CloseMenu() + else + ClearAllHelpMessages() + + drawTitle() + drawSubTitle() + + currentKey = nil + + if IsDisabledControlJustReleased(0, keys.down) then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", true) + + if menu.currentOption < optionCount then + menu.currentOption = menu.currentOption + 1 + else + menu.currentOption = 1 + end + elseif IsDisabledControlJustReleased(0, keys.up) then + PlaySoundFrontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", true) + + if menu.currentOption > 1 then + menu.currentOption = menu.currentOption - 1 + else + menu.currentOption = optionCount + end + elseif IsDisabledControlJustReleased(0, keys.left) then + currentKey = keys.left + elseif IsDisabledControlJustReleased(0, keys.right) then + currentKey = keys.right + elseif IsDisabledControlJustReleased(0, keys.select) then + currentKey = keys.select + elseif IsDisabledControlJustReleased(0, keys.back) then + if menus[menu.previousMenu] then + PlaySoundFrontend(-1, "BACK", "HUD_FRONTEND_DEFAULT_SOUNDSET", true) + setMenuVisible(menu.previousMenu, true) + else + WarMenu.CloseMenu() + end + end + + optionCount = 0 + end + end +end + + +function WarMenu.CurrentOption() + if currentMenu and optionCount ~= 0 and menus[currentMenu] then + return menus[currentMenu].currentOption + end + + return nil +end + + +function WarMenu.SetMenuWidth(id, width) + setMenuProperty(id, 'width', width) +end + + +function WarMenu.SetMenuX(id, x) + setMenuProperty(id, 'x', x) +end + + +function WarMenu.SetMenuY(id, y) + setMenuProperty(id, 'y', y) +end + + +function WarMenu.SetMenuMaxOptionCountOnScreen(id, count) + setMenuProperty(id, 'maxOptionCount', count) +end + + +function WarMenu.SetTitle(id, title) + setMenuProperty(id, 'title', title) +end + + +function WarMenu.SetTitleColor(id, r, g, b, a) + setMenuProperty(id, 'titleColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or menus[id].titleColor.a }) +end + + +function WarMenu.SetTitleBackgroundColor(id, r, g, b, a) + setMenuProperty(id, 'titleBackgroundColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or menus[id].titleBackgroundColor.a }) +end + + +function WarMenu.SetTitleBackgroundSprite(id, textureDict, textureName) + RequestStreamedTextureDict(textureDict) + setMenuProperty(id, 'titleBackgroundSprite', { dict = textureDict, name = textureName }) +end + + +function WarMenu.SetSubTitle(id, text) + setMenuProperty(id, 'subTitle', string.upper(text)) +end + + +function WarMenu.SetMenuBackgroundColor(id, r, g, b, a) + setMenuProperty(id, 'menuBackgroundColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or menus[id].menuBackgroundColor.a }) +end + + +function WarMenu.SetMenuTextColor(id, r, g, b, a) + setMenuProperty(id, 'menuTextColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or menus[id].menuTextColor.a }) +end + +function WarMenu.SetMenuSubTextColor(id, r, g, b, a) + setMenuProperty(id, 'menuSubTextColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or menus[id].menuSubTextColor.a }) +end + +function WarMenu.SetMenuFocusColor(id, r, g, b, a) + setMenuProperty(id, 'menuFocusColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or menus[id].menuFocusColor.a }) +end + + +function WarMenu.SetMenuButtonPressedSound(id, name, set) + setMenuProperty(id, 'buttonPressedSound', { ['name'] = name, ['set'] = set }) +end diff --git a/resources/wheelvarietypack/__resource.lua b/resources/wheelvarietypack/__resource.lua new file mode 100644 index 000000000..d4963ad00 --- /dev/null +++ b/resources/wheelvarietypack/__resource.lua @@ -0,0 +1,10 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +files { + 'carcols.meta', +} + +data_file 'CARCOLS_FILE' 'carcols.meta' + +-- specfiy the names of the items being added within this (same as in the lang file in a dlc pack(kinda, the formatting is different)) +client_script 'names.lua' \ No newline at end of file diff --git a/resources/wheelvarietypack/carcols.meta b/resources/wheelvarietypack/carcols.meta new file mode 100644 index 000000000..097c628cc --- /dev/null +++ b/resources/wheelvarietypack/carcols.meta @@ -0,0 +1,139 @@ + + + + + + wheel_capr_01 + + Chevrolet Caprice PPV Hub + + + + + wheel_polint_01 + + Ford Police Interceptor Steel + + + + + wheel_polint_02 + + Ford Police Interceptor Hub + + + + + wheel_chgr_01 + + Dodge Charger RWD Hub + + + + + wheel_chgr_02 + + Dodge Charger AWD Hub + + + + + wheel_chgr_03 + + Dodge Charger RWD Steel + + + + + wheel_chgr_04 + + Dodge Charger AWD Steel + + + + + wheel_chgr_05 + + Dodge Charger SXT + + + + + wheel_chgr_06 + + Dodge Charger SE Hub + + + + + wheel_chgr_07 + + Dodge Charger GT + + + + + wheel_cvpi_01 + + Ford CVPI Hub 2005 + + + + + wheel_cvpi_02 + + Ford CVPI Hub 2011 + + + + + wheel_cvpi_03 + + Ford CVPI Steel + + + + + wheel_hoe_01 + + Chevrolet Tahoe SSV Gray Steel + + + + + wheel_hoe_02 + + Chevrolet Tahoe SSV Black Steel + + + + + wheel_hoe_03 + + Chevrolet Tahoe LS + + + + + wheel_hoe_04 + + Chevrolet Tahoe LTZ + + + + + wheel_imp_01 + + Chevrolet Impala LPV Hub + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/wheelvarietypack/dlctext.meta b/resources/wheelvarietypack/dlctext.meta new file mode 100644 index 000000000..22bb4c390 --- /dev/null +++ b/resources/wheelvarietypack/dlctext.meta @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/resources/wheelvarietypack/stream/wheel_capr_01.ydr b/resources/wheelvarietypack/stream/wheel_capr_01.ydr new file mode 100644 index 000000000..41b13b1c3 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_capr_01.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11ec99a7786a32c431fd1de59f3d611bcc4128763d1bd3d33a5600942adac2d1 +size 2146834 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_01.ydr b/resources/wheelvarietypack/stream/wheel_chgr_01.ydr new file mode 100644 index 000000000..4fa37d9cf --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_01.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb539747fd7b4b16f10e59d62f041b16f006812d5392984271ba47b3e2330d15 +size 1398117 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_02.ydr b/resources/wheelvarietypack/stream/wheel_chgr_02.ydr new file mode 100644 index 000000000..70981a175 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_02.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:872560addd88ac829cafd15c863f79db8f341044f41510e44356ded76ac35cc1 +size 2458167 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_03.ydr b/resources/wheelvarietypack/stream/wheel_chgr_03.ydr new file mode 100644 index 000000000..cff769a4b --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_03.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cec3b892c32ea51b56d9cc754915f78028fc89cf69c766e28cd760b289f6bf5 +size 1505544 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_04.ydr b/resources/wheelvarietypack/stream/wheel_chgr_04.ydr new file mode 100644 index 000000000..c94030ba8 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_04.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5df9ae712b67ff9b4ac20a481cadf1978933ac6621031fb5ad2f3a2540ed08a5 +size 1879933 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_05.ydr b/resources/wheelvarietypack/stream/wheel_chgr_05.ydr new file mode 100644 index 000000000..76a1964db --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_05.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a3830d1f59746781465f7607f718f40364a8b58cd753b7de5a7b3793979d266 +size 3805053 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_06.ydr b/resources/wheelvarietypack/stream/wheel_chgr_06.ydr new file mode 100644 index 000000000..f87dc979d --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_06.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b1c42d9fedfad6eca26dc4495e75d9e865af69e978470debb4b1f8c77aecd83 +size 958711 diff --git a/resources/wheelvarietypack/stream/wheel_chgr_07.ydr b/resources/wheelvarietypack/stream/wheel_chgr_07.ydr new file mode 100644 index 000000000..f7986ed54 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_chgr_07.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a746a688aa0fa74f4251f40c233b39c89d1e2c2ec270909d4ee602c4ed42ba6 +size 2651139 diff --git a/resources/wheelvarietypack/stream/wheel_cvpi_01.ydr b/resources/wheelvarietypack/stream/wheel_cvpi_01.ydr new file mode 100644 index 000000000..bbc0a142b --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_cvpi_01.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66fc6a6b1ebee70d6b377b6ae3c86fb7a8adb911e8788cccc6ac06eaea1a0cc1 +size 2457985 diff --git a/resources/wheelvarietypack/stream/wheel_cvpi_02.ydr b/resources/wheelvarietypack/stream/wheel_cvpi_02.ydr new file mode 100644 index 000000000..17ca4fa1c --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_cvpi_02.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b57acafa9614fc564b4826744d14b92f9bcec0afb1546df61f7ea31efb1ddd1 +size 2505984 diff --git a/resources/wheelvarietypack/stream/wheel_cvpi_03.ydr b/resources/wheelvarietypack/stream/wheel_cvpi_03.ydr new file mode 100644 index 000000000..1052981ba --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_cvpi_03.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5e759dea1a3daece48f11981b03149771781904affb07903f81325fe6f4e04d +size 2183480 diff --git a/resources/wheelvarietypack/stream/wheel_hoe_01.ydr b/resources/wheelvarietypack/stream/wheel_hoe_01.ydr new file mode 100644 index 000000000..f1c3fe3c1 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_hoe_01.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d90e0ce572cdace1a9b9d2d96bbd48b3964b5e8ab6ae735cc2583e7e8f5a9bc3 +size 1598627 diff --git a/resources/wheelvarietypack/stream/wheel_hoe_02.ydr b/resources/wheelvarietypack/stream/wheel_hoe_02.ydr new file mode 100644 index 000000000..bb7dd7932 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_hoe_02.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecb982b87e646b2a5d78ec4c5dbf98da8278aadc3f657176d85bdd7ccb6f8f12 +size 1720280 diff --git a/resources/wheelvarietypack/stream/wheel_hoe_03.ydr b/resources/wheelvarietypack/stream/wheel_hoe_03.ydr new file mode 100644 index 000000000..9a3b03e1c --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_hoe_03.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15f2cbb59f1216987e16c3caec2894d3075c5ed7cc16aec578136fc125d54b8e +size 337506 diff --git a/resources/wheelvarietypack/stream/wheel_hoe_04.ydr b/resources/wheelvarietypack/stream/wheel_hoe_04.ydr new file mode 100644 index 000000000..65e9114cd --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_hoe_04.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f2cc8ca3451bf849eb01c6a2a7f5533442922ff39eea59599d33741f21ba27c +size 2613771 diff --git a/resources/wheelvarietypack/stream/wheel_imp_01.ydr b/resources/wheelvarietypack/stream/wheel_imp_01.ydr new file mode 100644 index 000000000..f87044926 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_imp_01.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:930827c206952adbef1880e98b020d937a9c30f583ce1fe8d2bd3422785126cd +size 1300804 diff --git a/resources/wheelvarietypack/stream/wheel_polint_01.ydr b/resources/wheelvarietypack/stream/wheel_polint_01.ydr new file mode 100644 index 000000000..5380a7bde --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_polint_01.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8782439074e24a466beb1ea5e605a4c75bc17b567b1f886f38ed054d34b7b4cf +size 4574158 diff --git a/resources/wheelvarietypack/stream/wheel_polint_02.ydr b/resources/wheelvarietypack/stream/wheel_polint_02.ydr new file mode 100644 index 000000000..b99941f85 --- /dev/null +++ b/resources/wheelvarietypack/stream/wheel_polint_02.ydr @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09c707d277dc1a6f9929be45772275daa7e68466b8f35da2571750821b9ad120 +size 1887811 diff --git a/resources/wheelvarietypack/wheelvarietypackContentUnlocks.meta b/resources/wheelvarietypack/wheelvarietypackContentUnlocks.meta new file mode 100644 index 000000000..4ddd62b7b --- /dev/null +++ b/resources/wheelvarietypack/wheelvarietypackContentUnlocks.meta @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/server.cfg b/server.cfg index 30dc217be..37b732e23 100644 --- a/server.cfg +++ b/server.cfg @@ -163,6 +163,11 @@ start rcore_pool start asedrussounds start LegacyFuel start refuelingnozzle +start wheelvarietypack +start cummins5924v +start stretcher +start stretcherscript + #[-----Discord Perms-----] start discord_perms