자동차가 손상이 되면 시간이 지나야 수리가 복구 됩니다.
그러나 CET코드면 찌그러진 차가 원상태가 됩니다.
조건은 타고 있을때
기존에 존재했던 차 수리 CET는 차에서 내리면 다시 찌그러진 상태가 되지만
이 CET코드는 진짜 수리가 됩니다.
다만
완전히 불타서 완파 상태가 되어
차에 탈 수 없게 되면
먹히지 않습니다.
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:Destruction-resetGrid() Fix:Destruction-resetGlass() GVC:UpdateDamageEngineEffects() GVC:RepairVehicle() GVC:VehicleVisualDestructionSetup() GVPS:CloseAllVehDoors(true) GVPS:CloseAllVehWindows() GVPS:ForcePersistentStateChanged() alert(currVehName.." \n"..currVehType, " Fixed !") end end end fixVehicle()