- 1
- 0
Код взят от сюда https://www.blast.hk/threads/157906/
require 'lib.moonloader'
local active = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('gate',function()
active = not active
sampAddChatMessage('[gate]: ' .. (active and 'work' or 'dont work'), -1)
end)
while true do
wait(0)
if not sampIsCursorActive() and isKeyJustPressed(VK_H) and active then
sampSendChat('/opengate')
end
end
end
Я вообще не занимаюсь писанием скриптов, просто как то надо убрать активацию /gate , сделав автоматически
require 'lib.moonloader'
local active = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('gate',function()
active = not active
sampAddChatMessage('[gate]: ' .. (active and 'work' or 'dont work'), -1)
end)
while true do
wait(0)
if not sampIsCursorActive() and isKeyJustPressed(VK_H) and active then
sampSendChat('/opengate')
end
end
end
Я вообще не занимаюсь писанием скриптов, просто как то надо убрать активацию /gate , сделав автоматически