1 скрипт:
require 'moonloader'
local sampev = require('lib.samp.events')
local memory = require("memory")
enabled = true
function main()
while not isSampAvailable() do wait(0) end
local oldProtect = memory.unprotect(0x748063, 5)
memory.hex2bin('E8F83BDFFF', 0x748063, 5)
memory.protect(0x748063, 5, oldProtect)
sampAddChatMessage('Скрипт загружен.', -1)
sampRegisterChatCommand('roller', function()
enabled = not enabled
sampAddChatMessage(enabled and 'RollerFIX: Enabled' or 'RollerFIX: Disabled', -1)
end)
while true do
wait(0)
if enabled then
if isKeyDown(VK_W) or isKeyDown(VK_A) or isKeyDown(VK_S) or isKeyDown(VK_D) then
setCharAnimSpeed(PLAYER_PED, 'skate_idle', 1000)
wait(150)
end
end
end
end
function sampev.onShowDialog(id, style, title, button1, button2, text)
lua_thread.create(function()
if title:find("4/4") then
sampSendDialogResponse(id, 1, 1, -1)
wait(0)
sampSendDialogResponse(id, 1, 0, 'Marko_Cloud')
sampCloseCurrentDialogWithButton(0)
end
end)