require 'lib.moonloader'
function main()
while not isSampAvailable() do wait(100) end
while true do wait(0)
if isKeyJustPressed(VK_R) and not sampIsChatInputActive() and not sampIsDialogActive() and not isSampfuncsConsoleActive() and not sampIsScoreboardOpen() and not sampIsDialogActive() then
if isCharInAnyCar(PLAYER_PED) then
freezeCarPosition(storeCarCharIsInNoSave(PLAYER_PED), false)
else
setPlayerControl(PLAYER_HANDLE, true)
freezeCharPosition(PLAYER_PED, false)
clearCharTasksImmediately(PLAYER_PED)
sampSendChat("52") --- Пишет в чат
end
end
end
end