function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('cfix', function()
if isCharInAnyCar(PLAYER_PED) and getDriverOfCar(storeCarCharIsInNoSave(PLAYER_PED)) == PLAYER_PED then
car = storeCarCharIsInNoSave(playerPed)
lua_thread.create(function()
for i = getCarHealth(car), 1500, 50 do
setCarHealth(storeCarCharIsInNoSave(PLAYER_PED), i)
wait(100)
end
end)
else
sampAddChatMessage('Сядь в машину!', -1)
end
end)
wait(-1)
end