- 42
- 2
- Версия MoonLoader
- .027.0-preview
На серверах стоит блокировка взятия гана в руки по уровню путём скролла обратно на кулак. Как это можно обойти и какие есть ошибки в коде?
CODE:
local sampev = require 'lib.samp.events'
local samp = require 'samp.events'
local work = false
local lastWeapon = 24
function main()
while not isSampAvailable() do wait(100) end
sampAddChatMessage("[GunBypass] successfully loaded", 0xFFFFFF)
sampRegisterChatCommand("bypass", function()
work = not work
sampAddChatMessage(work and "[GunBypass]: work" or "[GunBypass]: not work", -1)
end)
while true do
if work then
bypass()
end
wait(100)
end
end
function bypass()
local weapon = getCurrentCharWeapon(PLAYER_PED)
if work and weapon then
if weapon ~= lastWeapon then
setPlayerWeapon(lastWeapon)
end
end
end