перебинд

mcskirmish

Участник
Автор темы
252
14
Друзья сделайте перебинд на b пожалуйста



script_name('chepxha sqd')
script_author('Flake')

local q = require 'lib.samp.events'
local inicfg = require 'inicfg'
local vkeys = require 'vkeys'
local imgui = require 'imgui'
local mem = require 'memory'
local time = nil
local captime = nil
local t = 0
local captcha = ''
local captchaTable = {}

function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("ontr", function() state = not state
sampAddChatMessage((state and '{000000}[chepxha sqd{000000}] {ffffff}Можете тренировать свои пальчики!' or '{000000}[chepxha sqd{000000}] {ffffff}Тренировка пальчиков окончена!'), -1)
end)
sampAddChatMessage("{000000}[chepxha sqd{d1b02c}1.1 by flake{000000}] {ffffff}Успешно загружен! Команда: /ontr Активация N англ.",-1)

while true do wait(0)
if state then
if testCheat("n") and not sampIsChatInputActive() and not sampIsDialogActive() then showCaptcha() end
local result, button, list, input = sampHasDialogRespond(8813)
if result then
if button == 1 then
if input == captcha..'0' then sampAddChatMessage(string.format('{000000}[chepxha sqd{000000}] {ffffff}Код верный [%.3f]', os.clock() - captime), -1)
elseif input ~= captcha..'0' then sampAddChatMessage(string.format('{000000}[chepxha sqd{000000}] {ffffff}Неверный код! [%.3f] ('..captcha..'0|'..input..')', os.clock() - captime), -1) end
end
removeTextdraws()
end
end
end
end

function removeTextdraws()
if t > 0 then
for i = 1, t do sampTextdrawDelete(i) end
t = 0
captcha = ''
captime = nil
end
end

function GenerateTextDraw(id, PosX, PosY)
if id == 0 then
t = t + 1
sampTextdrawCreate(t, "LD_SPAC:white", PosX - 5, PosY + 7)
sampTextdrawSetLetterSizeAndColor(t, 0, 3, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX+5, 0.000000)
elseif id == 1 then
for i = 0, 1 do
t = t + 1
if i == 0 then offsetX = 3; offsetBX = 15 else offsetX = -3; offsetBX = -15; end
sampTextdrawCreate(t, "LD_SPAC:white", PosX - offsetX, PosY)
sampTextdrawSetLetterSizeAndColor(t, 0, 4.5, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-offsetBX, 0.000000)
end
elseif id == 2 then
for i = 0, 1 do
t = t + 1
if i == 0 then offsetX = -8; offsetY = 7 offsetBX = 15 else offsetX = 6; offsetY = 25 offsetBX = -15; end
sampTextdrawCreate(t, "LD_SPAC:white", PosX - offsetX, PosY + offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, 0.8, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-offsetBX, 0.000000)
end
elseif id == 3 then
for i = 0, 1 do
t = t + 1
if i == 0 then size = 0.8; offsetY = 7 else size = 1; offsetY = 25 end
sampTextdrawCreate(t, "LD_SPAC:white", PosX+10, PosY+offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, 1, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-15, 0.000000)
end
elseif id == 4 then
for i = 0, 1 do
t = t + 1
if i == 0 then size = 1.8; offsetX = -10; offsetY = 0 offsetBX = 10 else size = 2; offsetX = -10; offsetY = 25 offsetBX = 15; end
sampTextdrawCreate(t, "LD_SPAC:white", PosX - offsetX, PosY + offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, size, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-offsetBX, 0.000000)
end
elseif id == 5 then
for i = 0, 1 do
t = t + 1
if i == 0 then size = 0.8; offsetX = 8; offsetY = 7 offsetBX = -15 else size = 1; offsetX = -10; offsetY = 25 offsetBX = 15; end
sampTextdrawCreate(t, "LD_SPAC:white", PosX - offsetX, PosY + offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, size, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-offsetBX, 0.000000)
end
elseif id == 6 then
for i = 0, 1 do
t = t + 1
if i == 0 then size = 0.8; offsetX = 7.5; offsetY = 7 offsetBX = -15 else size = 1; offsetX = -10; offsetY = 25 offsetBX = 10; end
sampTextdrawCreate(t, "LD_SPAC:white", PosX - offsetX, PosY + offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, size, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-offsetBX, 0.000000)
end
elseif id == 7 then
t = t + 1
sampTextdrawCreate(t, "LD_SPAC:white", PosX - 13, PosY + 7)
sampTextdrawSetLetterSizeAndColor(t, 0, 3.75, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX+5, 0.000000)
elseif id == 8 then
for i = 0, 1 do
t = t + 1
if i == 0 then size = 0.8; offsetY = 7 else size = 1; offsetY = 25 end
sampTextdrawCreate(t, "LD_SPAC:white", PosX+10, PosY+offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, 1, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-10, 0.000000)
end
elseif id == 9 then
for i = 0, 1 do
t = t + 1
if i == 0 then size = 0.8; offsetY = 6; offsetBX = 10; else size = 1; offsetY = 25; offsetBX = 15; end
sampTextdrawCreate(t, "LD_SPAC:white", PosX+10, PosY+offsetY)
sampTextdrawSetLetterSizeAndColor(t, 0, 1, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, PosX-offsetBX, 0.000000)
end
end
end

function showCaptcha()
removeTextdraws()
t = t + 1
sampTextdrawCreate(t, "LD_SPAC:white", 220, 120)
sampTextdrawSetLetterSizeAndColor(t, 0, 6.5, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF1A2432, 380, 0.000000)

t = t + 1
sampTextdrawCreate(t, "LD_SPAC:white", 225, 125)
sampTextdrawSetLetterSizeAndColor(t, 0, 5.5, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF759DA3, 375, 0.000000)
nextPos = -30.0;

math.randomseed(os.time())
for i = 1, 4 do
a = math.random(0, 9)
table.insert(captchaTable, a)
captcha = captcha..a
end

for i = 0, 4 do
nextPos = nextPos + 30
t = t + 1
sampTextdrawCreate(t, "usebox", 240 + nextPos, 130)
sampTextdrawSetLetterSizeAndColor(t, 0, 4.5, 0x80808080)
sampTextdrawSetBoxColorAndSize(t, 1, 0xFF1A2432, 30, 25.000000)
sampTextdrawSetAlign(t, 2)
if i < 4 then GenerateTextDraw(captchaTable[i + 1], 240 + nextPos, 130, 3 + i * 2)
else GenerateTextDraw(0, 240 + nextPos, 130, 3 + i * 10) end
end
captchaTable = {}
sampShowDialog(8813, '{F89168}Тренировка капчи', '{FFFFFF}Введите {C6FB4A}5{FFFFFF} символов, которые\nвидно на {C6FB4A}вашем{FFFFFF} экране.', 'Принять', 'Отмена', 1)
captime = os.clock()
end
 

sat0ry

Известный
1,089
290
IMG_20220802_151240.jpg
 
  • Нравится
Реакции: mcskirmish