Advertisement
Slopeh

cy244

Dec 12th, 2023
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | Gaming | 0 0
  1. fixVehicle = function() alert = function(vehType, msg) PreventionSystem.ShowMessage(vehType.." "..msg, 4.0) end if not Game.GetWorkspotSystem():IsActorInWorkspot(Game.GetPlayer()) then alert('', ' You\'re not in a vehicle !') else Fix = Game['GetMountedVehicle;GameObject'](Game.GetPlayer()); if Fix then GVPS = Fix:GetVehiclePS(); GVC = Fix:GetVehicleComponent(); currVehName = Fix:GetDisplayName(); currVehType = Fix:GetVehicleType().value; GVC.damageLevel = 0; if currVehType ~= "Bike" then GVC.bumperFrontState, GVC.bumperBackState = 0, 0; for k, partState in next, {'hood_destruction', 'wheel_f_l_destruction', 'wheel_f_r_destruction', 'bumper_b_destruction', 'bumper_f_destruction', 'door_f_l_destruction', 'door_f_r_destruction', 'trunk_destruction', 'bumper_b_destruction_side_2', 'bumper_f_destruction_side_2'} do AnimationControllerComponent.SetInputFloat(Fix, partState, 0.0) end end flatTires = Fix:GetFlatTireIndex(); if flatTires >= 0 then for i, v in next, {0,1,2,3} do Fix:ToggleBrokenTire(v, false) end end Fix:DestructionResetGrid() Fix:DestructionResetGlass() GVC:UpdateDamageEngineEffects() GVC:RepairVehicle() GVC:VehicleVisualDestructionSetup() GVPS:CloseAllVehDoors(true) GVPS:CloseAllVehWindows() GVPS:ForcePersistentStateChanged() alert(currVehName.." \n"..currVehType, " Fixed !") end end end fixVehicle()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement