fixing vehicles

This commit is contained in:
KingMcDonalds
2026-02-26 23:08:02 -08:00
parent 6985f92600
commit 66ed739664
25 changed files with 6 additions and 2870 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

-13
View File
@@ -1,13 +0,0 @@
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
files {
'vehicles.meta',
'carcols.meta',
'carvariations.meta',
'handling.meta'
}
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'
data_file 'HANDLING_FILE' 'data/handling.meta'
File diff suppressed because it is too large Load Diff
-77
View File
@@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfoVariation>
<variationData>
<Item>
<modelName>24sodur_ht</modelName>
<colors>
<Item>
<indices content="char_array">
0
0
0
0
5
0
</indices>
<liveries>
<Item value="false" />
</liveries>
</Item>
<Item>
<indices content="char_array">
0
0
0
0
5
0
</indices>
<liveries>
<Item value="false" />
</liveries>
</Item>
<Item>
<indices content="char_array">
0
0
0
0
5
0
</indices>
<liveries>
<Item value="false" />
</liveries>
</Item>
<Item>
<indices content="char_array">
0
0
0
0
5
0
</indices>
<liveries>
<Item value="false" />
</liveries>
</Item>
</colors>
<kits>
<Item>0_default_modkit</Item>
</kits>
<windowsWithExposedEdges />
<plateProbabilities>
<Probabilities>
<Item>
<Name>Police guv plate</Name>
<Value value="100" />
</Item>
</Probabilities>
</plateProbabilities>
<lightSettings value="242" />
<sirenSettings value="2465" />
</Item>
</variationData>
</CVehicleModelInfoVariation>
-67
View File
@@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CHandlingDataMgr>
<HandlingData>
<Item type="CHandlingData">
<handlingName>24DURANGO</handlingName>
<fMass value="2500.000000" />
<fInitialDragCoeff value="8.000000" />
<fPercentSubmerged value="85.000000" />
<vecCentreOfMassOffset x="0.000000" y="0.050000" z="0.000000" />
<vecInertiaMultiplier x="1.000000" y="1.600000" z="1.600000" />
<fDriveBiasFront value="0.600000" />
<nInitialDriveGears value="8" />
<fInitialDriveForce value="0.300000" />
<fDriveInertia value="1.000000" />
<fClutchChangeRateScaleUpShift value="2.100000" />
<fClutchChangeRateScaleDownShift value="2.100000" />
<fInitialDriveMaxFlatVel value="140.000000" />
<fBrakeForce value="0.600000" />
<fBrakeBiasFront value="0.650000" />
<fHandBrakeForce value="0.350000" />
<fSteeringLock value="35.000000" />
<fTractionCurveMax value="3.300000" />
<fTractionCurveMin value="3.400000" />
<fTractionCurveLateral value="19.000000" />
<fTractionSpringDeltaMax value="0.130000" />
<fLowSpeedTractionLossMult value="1.000000" />
<fCamberStiffnesss value="0.000000" />
<fTractionBiasFront value="0.500000" />
<fTractionLossMult value="0.900000" />
<fSuspensionForce value="1.400000" />
<fSuspensionCompDamp value="0.700000" />
<fSuspensionReboundDamp value="1.200000" />
<fSuspensionUpperLimit value="0.100000" />
<fSuspensionLowerLimit value="-0.180000" />
<fSuspensionRaise value="0.000000" />
<fSuspensionBiasFront value="0.510000" />
<fAntiRollBarForce value="0.900000" />
<fAntiRollBarBiasFront value="0.500000" />
<fRollCentreHeightFront value="0.700000" />
<fRollCentreHeightRear value="0.630000" />
<fCollisionDamageMult value="1.000000" />
<fWeaponDamageMult value="1.000000" />
<fDeformationDamageMult value="0.800000" />
<fEngineDamageMult value="1.000000" />
<fPetrolTankVolume value="80.000000" />
<fOilVolume value="5.500000" />
<fSeatOffsetDistX value="0.000000" />
<fSeatOffsetDistY value="0.000000" />
<fSeatOffsetDistZ value="0.000000" />
<nMonetaryValue value="50000" />
<strModelFlags>440010</strModelFlags>
<strHandlingFlags>0</strHandlingFlags>
<strDamageFlags>0</strDamageFlags>
<AIHandling>AVERAGE</AIHandling>
<SubHandlingData>
<Item type="CCarHandlingData">
<fBackEndPopUpCarImpulseMult value="0.100000" />
<fBackEndPopUpBuildingImpulseMult value="0.030000" />
<fBackEndPopUpMaxDeltaSpeed value="0.600000" />
</Item>
<Item type="NULL" />
<Item type="NULL" />
</SubHandlingData>
</Item>
</HandlingData>
</CHandlingDataMgr>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-58
View File
@@ -1,58 +0,0 @@
--[[
Ultimate Lighting Controller Config
the ULC resource is required to use this configuration
get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest
To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview
]]
return {names = {"24sodur_ht"},
steadyBurnConfig = {
forceOn = false, useTime = false,
disableWithLights = false,
sbExtras = {}
},
parkConfig = {
usePark = true,
useSync = false,
syncWith = {},
pExtras = {5,6,7,8,9,10,11},
dExtras = {1,2,3,4}
},
hornConfig = {
useHorn = false,
hornExtras = {},
disableExtras = {}
},
brakeConfig = {
useBrakes = false,
speedThreshold = 3,
brakeExtras = {},
disableExtras = {}
},
reverseConfig = {
useReverse = false,
reverseExtras = {},
disableExtras = {}
},
doorConfig = {
useDoors = true,
driverSide = {enable = {}, disable = {6}},
passSide = {enable = {}, disable = {7}},
trunk = {enable ={}, disable = {}}
},
buttons = {
{label = "STAGE 2", key = 1, color = "green", extra = 5, linkedExtras = {6,7,8,9,10,11}, oppositeExtras = {1,2,3,4}, offExtras = {}, repair = false},
{label = "STAGE 3", key = 2, color = "green", extra = 1, linkedExtras = {4,3,2}, oppositeExtras = {}, offExtras = {}, repair = false},
{label = "FNT CUT", key = 3, color = "green", extra = 5, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false}
},
stages = {
useStages = false,
stageKeys = {},
},
defaultStages = {
useDefaults = false,
enableKeys = {},
disableKeys = {}
}
}
-134
View File
@@ -1,134 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
<residentTxd>vehshare</residentTxd>
<residentAnims />
<InitDatas>
<Item>
<modelName>24sodur_ht</modelName>
<txdName>24sodur_ht</txdName>
<handlingId>24DURANGO</handlingId>
<gameName>24sodur_ht</gameName>
<vehicleMakeName>21DODGE</vehicleMakeName>
<expressionDictName>null</expressionDictName>
<expressionName>null</expressionName>
<animConvRoofDictName>null</animConvRoofDictName>
<animConvRoofName>null</animConvRoofName>
<animConvRoofWindowsAffected />
<ptfxAssetName>null</ptfxAssetName>
<audioNameHash>str392m</audioNameHash>
<layout>LAYOUT_STD_HIGHWINDOW</layout>
<coverBoundOffsets>GRESLEY_COVER_OFFSET_INFO</coverBoundOffsets>
<explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
<scenarioLayout />
<cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
<aimCameraName>DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA</aimCameraName>
<bonnetCameraName>VEHICLE_BONNET_CAMERA_MID_NEAR</bonnetCameraName>
<povCameraName>DEFAULT_POV_CAMERA_LOOKAROUND</povCameraName>
<FirstPersonDriveByIKOffset x="0.000000" y="-0.050000" z="-0.030000" />
<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonProjectileDriveByIKOffset x="0.000000" y="-0.088000" z="0.093000" />
<FirstPersonProjectileDriveByPassengerIKOffset x="0.020000" y="0.060000" z="-0.090000" />
<FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="0.000000" z="-0.055000" />
<FirstPersonProjectileDriveByRearRightIKOffset x="0.000000" y="0.000000" z="-0.055000" />
<FirstPersonDriveByLeftPassengerIKOffset x="0.000000" y="0.000000" z="-0.040000" />
<FirstPersonDriveByRightPassengerIKOffset x="-0.045000" y="-0.048000" z="-0.040000" />
<FirstPersonDriveByRightRearPassengerIKOffset x="0.000000" y="0.000000" z="-0.040000" />
<FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonMobilePhoneOffset x="0.150000" y="0.268000" z="0.503000" />
<FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.425000" />
<FirstPersonMobilePhoneSeatIKOffset>
<Item>
<Offset x="0.156000" y="0.223000" z="0.493000" />
<SeatIndex value="2" />
</Item>
<Item>
<Offset x="0.156000" y="0.223000" z="0.493000" />
<SeatIndex value="3" />
</Item>
</FirstPersonMobilePhoneSeatIKOffset>
<PovCameraOffset x="0.000000" y="-0.115000" z="0.580000" />
<PovCameraVerticalAdjustmentForRollCage value="0.000000" />
<PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.030000" />
<PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.070000" />
<vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
<shouldUseCinematicViewMode value="true" />
<shouldCameraTransitionOnClimbUpDown value="false" />
<shouldCameraIgnoreExiting value="false" />
<AllowPretendOccupants value="true" />
<AllowJoyriding value="false" />
<AllowSundayDriving value="false" />
<AllowBodyColorMapping value="true" />
<wheelScale value="0.250000" />
<wheelScaleRear value="0.250000" />
<dirtLevelMin value="0.000000" />
<dirtLevelMax value="50.000000" />
<envEffScaleMin value="0.000000" />
<envEffScaleMax value="1.000000" />
<envEffScaleMin2 value="0.000000" />
<envEffScaleMax2 value="1.000000" />
<damageMapScale value="0.900000" />
<damageOffsetScale value="1.000000" />
<diffuseTint value="0xD1000000" />
<steerWheelMult value="1.000000" />
<HDTextureDist value="5.000000" />
<lodDistances content="float_array">
20.000000
60.000000
100.000000
125.000000
500.000000
500.000000
</lodDistances>
<minSeatHeight value="0.966" />
<identicalModelSpawnDistance value="20" />
<maxNumOfSameColor value="10" />
<defaultBodyHealth value="1000.000000" />
<pretendOccupantsScale value="1.000000" />
<visibleSpawnDistScale value="1.000000" />
<trackerPathWidth value="2.000000" />
<weaponForceMult value="1.000000" />
<frequency value="100" />
<swankness>SWANKNESS_1</swankness>
<maxNum value="999" />
<flags>FLAG_USE_INTERIOR_RED_LIGHT FLAG_HAS_LIVERY FLAG_HAS_INTERIOR_EXTRAS FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_ALLOW_HATS_NO_ROOF</flags>
<type>VEHICLE_TYPE_CAR</type>
<plateType>VPT_FRONT_AND_BACK_PLATES</plateType>
<dashboardType>VDT_SPEEDO</dashboardType>
<vehicleClass>VC_EMERGENCY</vehicleClass>
<wheelType>VWT_SPORT</wheelType>
<trailers />
<additionalTrailers />
<drivers />
<extraIncludes />
<doorsWithCollisionWhenClosed />
<driveableDoors />
<bumpersNeedToCollideWithMap value="false" />
<needsRopeTexture value="false" />
<requiredExtras />
<rewards />
<cinematicPartCamera>
<Item>WHEEL_FRONT_RIGHT_CAMERA</Item>
<Item>WHEEL_FRONT_LEFT_CAMERA</Item>
<Item>WHEEL_REAR_RIGHT_CAMERA</Item>
<Item>WHEEL_REAR_LEFT_CAMERA</Item>
</cinematicPartCamera>
<NmBraceOverrideSet />
<buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
<buoyancySphereSizeScale value="1.000000" />
<pOverrideRagdollThreshold type="NULL" />
<firstPersonDrivebyData>
<Item>RANGER_CAVALCADE_FRONT_LEFT</Item>
<Item>RANGER_FRONT_RIGHT</Item>
<Item>RANGER_PRANGER_REAR_LEFT</Item>
<Item>RANGER_PRANGER_REAR_RIGHT</Item>
</firstPersonDrivebyData>
</Item>
</InitDatas>
<txdRelationships>
<Item>
<parent>vehicles_speedo_interior</parent>
<child>24sodur_ht</child>
</Item>
</txdRelationships>
</CVehicleModelInfo__InitDataList>
Binary file not shown.
Binary file not shown.
-18
View File
@@ -1,18 +0,0 @@
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'
Binary file not shown.
Binary file not shown.
Binary file not shown.
-117
View File
@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
<residentTxd>vehshare</residentTxd>
<residentAnims />
<InitDatas>
<Item>
<modelName>stretcher</modelName>
<txdName>stretcher</txdName>
<handlingId>RUMPO</handlingId>
<gameName>stretcher</gameName>
<vehicleMakeName>BRAVADO</vehicleMakeName>
<expressionDictName>null</expressionDictName>
<expressionName>null</expressionName>
<animConvRoofDictName>null</animConvRoofDictName>
<animConvRoofName>null</animConvRoofName>
<animConvRoofWindowsAffected />
<ptfxAssetName>null</ptfxAssetName>
<audioNameHash />
<layout>LAYOUT_VAN</layout>
<coverBoundOffsets>RUMPO_COVER_OFFSET_INFO</coverBoundOffsets>
<explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
<scenarioLayout />
<cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
<aimCameraName>DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA</aimCameraName>
<bonnetCameraName>VEHICLE_BONNET_CAMERA_LOW</bonnetCameraName>
<povCameraName>DEFAULT_POV_CAMERA_LOOKAROUND_MID</povCameraName>
<FirstPersonDriveByIKOffset x="0.000000" y="-0.040000" z="0.000000" />
<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonProjectileDriveByIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonProjectileDriveByRearRightIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonDriveByLeftPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonDriveByRightPassengerIKOffset x="0.000000" y="0.010000" z="-0.08600" />
<FirstPersonDriveByRightRearPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
<FirstPersonMobilePhoneOffset x="0.155000" y="0.228000" z="0.463000" />
<FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.425000" />
<PovCameraOffset x="0.000000" y="-0.120000" z="0.565000" />
<PovCameraVerticalAdjustmentForRollCage value="0.000000" />
<PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.070000" />
<PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.070000" />
<vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
<shouldUseCinematicViewMode value="true" />
<shouldCameraTransitionOnClimbUpDown value="false" />
<shouldCameraIgnoreExiting value="false" />
<AllowPretendOccupants value="true" />
<AllowJoyriding value="true" />
<AllowSundayDriving value="true" />
<AllowBodyColorMapping value="true" />
<wheelScale value="0.234200" />
<wheelScaleRear value="0.234200" />
<dirtLevelMin value="0.300000" />
<dirtLevelMax value="0.850000" />
<envEffScaleMin value="0.000000" />
<envEffScaleMax value="1.000000" />
<envEffScaleMin2 value="0.000000" />
<envEffScaleMax2 value="1.000000" />
<damageMapScale value="0.600000" />
<damageOffsetScale value="1.000000" />
<diffuseTint value="0x05700000" />
<steerWheelMult value="1.000000" />
<HDTextureDist value="5.000000" />
<lodDistances content="float_array">
15.000000
35.000000
70.000000
140.000000
500.000000
500.000000
</lodDistances>
<minSeatHeight value="0.946" />
<identicalModelSpawnDistance value="100" />
<maxNumOfSameColor value="10" />
<defaultBodyHealth value="1000.000000" />
<pretendOccupantsScale value="1.000000" />
<visibleSpawnDistScale value="1.000000" />
<trackerPathWidth value="2.000000" />
<weaponForceMult value="2.000000" />
<frequency value="100" />
<swankness>SWANKNESS_1</swankness>
<maxNum value="999" />
<flags>FLAG_SMALL_WORKER FLAG_IS_VAN FLAG_DELIVERY FLAG_EXTRAS_ALL FLAG_AVERAGE_CAR FLAG_POOR_CAR FLAG_IS_BULKY</flags>
<type>VEHICLE_TYPE_CAR</type>
<plateType>VPT_BACK_PLATES</plateType>
<dashboardType>VDT_TRUCK</dashboardType>
<vehicleClass>VC_VAN</vehicleClass>
<wheelType>VWT_MUSCLE</wheelType>
<trailers />
<additionalTrailers />
<drivers />
<extraIncludes />
<doorsWithCollisionWhenClosed />
<driveableDoors />
<bumpersNeedToCollideWithMap value="false" />
<needsRopeTexture value="false" />
<requiredExtras />
<rewards />
<cinematicPartCamera>
<Item>WHEEL_FRONT_RIGHT_CAMERA</Item>
<Item>WHEEL_FRONT_LEFT_CAMERA</Item>
<Item>WHEEL_REAR_RIGHT_CAMERA</Item>
<Item>WHEEL_REAR_LEFT_CAMERA</Item>
</cinematicPartCamera>
<NmBraceOverrideSet />
<buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
<buoyancySphereSizeScale value="1.000000" />
<pOverrideRagdollThreshold type="NULL" />
<firstPersonDrivebyData>
<Item>RANGER_RANCHERXL_FRONT_LEFT</Item>
<Item>VAN_RUMPO_FRONT_RIGHT</Item>
</firstPersonDrivebyData>
</Item>
</InitDatas>
<txdRelationships />
</CVehicleModelInfo__InitDataList>
-297
View File
@@ -1,297 +0,0 @@
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
-109
View File
@@ -1,109 +0,0 @@
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 = "e450ambo", detection = 2.4, depth = -1.0, height = 0.0},
{
hash = 'e350vanb', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = '24ramambo', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'ALSrescue1', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'amrvan', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'CAMBO', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'f250ambo', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'medic22', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'medic1a', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'medic1b', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
{
hash = 'csfdmedic3', position = -5.0, positionRange = 2.0,
preconfig = 'yes', depth = -2.5, height = -0.25, offset = 0.0, yrot = 0.0,
doors = {2, 3}
},
}
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",
}
}
-10
View File
@@ -1,10 +0,0 @@
fx_version 'adamant'
game 'gta5'
-- Leaked By: Leaking Hub | Joshua Y. | https://discord.gg/aXWXXst
client_scripts {
'warmenu.lua',
'config.lua',
'client/main.lua'
}
Binary file not shown.
-523
View File
@@ -1,523 +0,0 @@
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
+2 -15
View File
@@ -2,22 +2,9 @@
"vehicles": [
"rrst",
"24sodur_ht",
"montereyparkpd25dura_180",
"sbcsd21durango",
"18charg",
"21ppv3",
"21ppvHCSO",
"23f150",
"23hoe",
"25legacyrango1",
"233ppv",
"BCSO21ppv",
"fs23hoe",
"leg21tahoeht_rb",
"MPD21ppv",
"sos23hoe",
"sbcsdcharger",
"sbcsdcharger2",
"sbcsdcharger",
"sbcsdcharger2",
"LAPD",
"lapd09charger1",
"lapd09charger2",