local active = false
local speed = 10 -- скорость плавания
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('swimfix', function() active = not active sampAddChatMessage(active and 'on' or 'off', -1) end)
while true do wait(0)
if active then
if isCharInWater(PLAYER_PED) then
local _, id = sampGetPlayerIdByCharHandle(PLAYER_PED); local anim = sampGetPlayerAnimationId(id); local lib, name = sampGetAnimationNameAndFile(anim)
if lib == 'SWIM' then
setCharAnimSpeed(PLAYER_PED, name, speed)
end
end
end
end
end