script_author('bottom_text')
print('author - https://www.blast.hk/members/217146/')
local ev = require 'samp.events'
local act = false
require "lib.moonloader"
local keys = require "vkeys"
function main()
while not isSampAvailable() do wait(100) end
while true do wait(0)
if isKeyJustPressed(VK_R) and not sampIsCursorActive() then -- клавишу менять здесь
if isCharInAnyCar(PLAYER_PED) then
act = not act
car = storeCarCharIsInNoSave(PLAYER_PED)
printString(act and 'activated' or 'deactivated', 2000)
if act then
speed = getCarSpeed(car)
freezeCarPosition(car, act)
else
freezeCarPosition(car, act)
setCarForwardSpeed(car, speed)
end
print(speed)
else
sampAddChatMessage('Вы не в транспорте.', -1)
end
end
end
end
function ev.onSendVehicleSync(data)
if act then
return false
end
end