script_name("AntiScroll") script_author("aedadai") script_version("2.0") local sampev = require 'lib.samp.events' local enabled = true function main() if not isSampLoaded() or not isSampfuncsLoaded() then return end while not isSampAvailable() do wait(100) end sampRegisterChatCommand("antiscroll", toggleScript) sampRegisterChatCommand("as", toggleScript) while true do wait(0) if enabled and isPlayerPlaying(PLAYER_HANDLE) then if getCurrentCharWeapon(PLAYER_PED) ~= 0 then setCurrentCharWeapon(PLAYER_PED, 0) end end end end function sampev.onGivePlayerWeapon(weaponId, ammo) if enabled and isPlayerPlaying(PLAYER_HANDLE) then lua_thread.create(function() wait(0) setCurrentCharWeapon(PLAYER_PED, 0) end) end end function sampev.onSetPlayerArmedWeapon(weaponId) if enabled and weaponId ~= 0 then return {0} end end function toggleScript() enabled = not enabled local status = enabled and "{00FF00}включен" or "{FF0000}выключен" sampAddChatMessage("[AntiScroll] {FFFFFF}Скрипт " .. status .. "{FFFFFF}.", 0x4A90E2) end