This commit is contained in:
KingMcDonalds
2022-04-30 18:48:02 -07:00
2 changed files with 20 additions and 10 deletions
BIN
View File
Binary file not shown.
+20 -10
View File
@@ -179,7 +179,8 @@ AddEventHandler('iens:repair', function()
healthEngineLast=1000.0
healthPetrolTankLast=1000.0
SetVehicleEngineOn(vehicle, true, false )
notification("~g~The mechanic repaired your car!")
exports['EGRP-Notifications']:CaptionIcon("Vehicle System", "Mechanic has repaired your vehicle!", "top", 3000, "dark", "", true, "mdi-wrench")
--notification("~g~The mechanic repaired your car!")
return
end
if GetVehicleEngineHealth(vehicle) < cfg.cascadingFailureThreshold + 5 then
@@ -191,19 +192,23 @@ AddEventHandler('iens:repair', function()
healthPetrolTankLast=750.0
SetVehicleEngineOn(vehicle, true, false )
SetVehicleOilLevel(vehicle,(GetVehicleOilLevel(vehicle)/3)-0.5)
notification("~g~" .. repairCfg.fixMessages[fixMessagePos] .. ", now get to a mechanic!")
exports['EGRP-Notifications']:CaptionIcon("Vehicle System", ""..repairCfg.fixMessages[fixMessagePos]..", now get to a mechanic!", "top", 3000, "dark", "", true, "mdi-wrench")
--notification("~g~" .. repairCfg.fixMessages[fixMessagePos] .. ", now get to a mechanic!")
fixMessagePos = fixMessagePos + 1
if fixMessagePos > repairCfg.fixMessageCount then fixMessagePos = 1 end
else
notification("~r~Your vehicle was too badly damaged. Unable to repair!")
exports['EGRP-Notifications']:Negative("System", "Vehicle too badly damaged, unable to repair!", "top", 3000, true)
--notification("~r~Your vehicle was too badly damaged. Unable to repair!")
end
else
notification("~y~" .. repairCfg.noFixMessages[noFixMessagePos] )
exports['EGRP-Notifications']:Warning("System", ""..repairCfg.noFixMessages[noFixMessagePos].."!", "top", 3000, true)
--notification("~y~" .. repairCfg.noFixMessages[noFixMessagePos] )
noFixMessagePos = noFixMessagePos + 1
if noFixMessagePos > repairCfg.noFixMessageCount then noFixMessagePos = 1 end
end
else
notification("~y~You must be in a vehicle to be able to repair it")
exports['EGRP-Notifications']:Negative("System", "You must be in a vehicle to repair it!", "top", 3000, true)
--notification("~y~You must be in a vehicle to be able to repair it")
end
end)
@@ -219,7 +224,8 @@ AddEventHandler('iens:fix', function()
healthEngineLast=1000.0
healthPetrolTankLast=1000.0
SetVehicleEngineOn(vehicle, true, false )
notification("~g~The mechanic repaired your car!")
exports['EGRP-Notifications']:CaptionIcon("Vehicle System", "Mechanic has repaired your vehicle!", "top", 3000, "dark", "", true, "mdi-wrench")
--notification("~g~The mechanic repaired your car!")
return
end
if GetVehicleEngineHealth(vehicle) < cfg.cascadingFailureThreshold + 5 then
@@ -231,19 +237,23 @@ AddEventHandler('iens:fix', function()
healthPetrolTankLast=750.0
SetVehicleEngineOn(vehicle, true, false )
SetVehicleOilLevel(vehicle,(GetVehicleOilLevel(vehicle)/3)-0.5)
notification("~g~" .. repairCfg.fixMessages[fixMessagePos] .. ", now get to a mechanic!")
exports['EGRP-Notifications']:CaptionIcon("Vehicle System", ""..repairCfg.fixMessages[fixMessagePos]..", now get to a mechanic!", "top", 3000, "dark", "", true, "mdi-wrench")
--notification("~g~" .. repairCfg.fixMessages[fixMessagePos] .. ", now get to a mechanic!")
fixMessagePos = fixMessagePos + 1
if fixMessagePos > repairCfg.fixMessageCount then fixMessagePos = 1 end
else
notification("~r~Your vehicle was too badly damaged. Unable to repair!")
exports['EGRP-Notifications']:Negative("System", "Vehicle too badly damaged, unable to repair!", "top", 3000, true)
--notification("~r~Your vehicle was too badly damaged. Unable to repair!")
end
else
notification("~y~" .. repairCfg.noFixMessages[noFixMessagePos] )
exports['EGRP-Notifications']:Warning("System", ""..repairCfg.noFixMessages[noFixMessagePos].."!", "top", 3000, true)
--notification("~y~" .. repairCfg.noFixMessages[noFixMessagePos] )
noFixMessagePos = noFixMessagePos + 1
if noFixMessagePos > repairCfg.noFixMessageCount then noFixMessagePos = 1 end
end
else
notification("~y~You must be in a vehicle to be able to repair it")
exports['EGRP-Notifications']:Negative("System", "You must be in a vehicle to repair it!", "top", 3000, true)
--notification("~y~You must be in a vehicle to be able to repair it")
end
end)