local event = require('lib.samp.events')
stop = 0
started = 0
prinato = 0
active_report = 0
active_report2 = 0
prikoll = false
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43)
while true do wait(0)
if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
if(active_report == 2) then
sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d)
sampSendChat("/"..cmd.." "..paramssss)
status(true, 1)
wait(1000)...
Горизонтальная табуляция (HT, TAB) — управляющий символ таблицы ASCII с кодом 0916, используется для выравнивания текста в строках. Встретив этот символ, терминал перемещает каретку (или курсор) вправо на ближайшую позицию табуляции.
local event = require('lib.samp.events')
stop = 0
started = 0
prinato = 0
active_report = 0
active_report2 = 0
prikoll = false
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43)
while true do wait(0)
if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
while isKeyDown(75) do wait(0) end
if(active_report == 2) then
sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d)
sampSendChat("/"..cmd.." "..paramssss)
status("true", 1)
wait(1000)
sampSendChat("/a [Forma] +")
active_report2 = 1
end
end
end
end
local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'}
function event.onServerMessage(color, text)
for k,v in ipairs(reasons) do
if text:match("%[.*%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s") then
started = started + 1
if started < 2 then
prikoll = true
admin_nick, admin_id, other = text:match("%[.+%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s(.*)")
cmd = v
paramssss = other
if stop == 0 then
lua_thread.create(function()
for i = 0, 5 do
if active_report2 == 0 then
status("false", i)
else
status("true", i)
end
end
if prikoll then
wait(550)
printStyledString("You missed form", 1000, 5)
active_report = 1
active_report2 = 0
started = 0
bbstart = -1
end
end)
end
end
end
end
end
function status(parsasm, ggbc)
if parsasm then
active_report2 = 1
prikoll = false
if ggbc == 5 then
active_report2 = 0
started = 0
end
active_report = 1
printStyledString("Admin form accepted", 5000, 5)
bbstart = -1
else
bbstart = -1
bbstart = bbstart + ggbc
if bbstart == 0 then
active_report = 2
end
if active_report2 == 0 then
wait(1000)
printStyledString('Admin form '..ggbc.." wait", 1000, 5)
end
end
end
не работает четКакое же это ...
код выравнял и убрал баги но по факту работать не будет т.к ты нахуярил все подряд
Lua:local event = require('lib.samp.events') stop = 0 started = 0 prinato = 0 active_report = 0 active_report2 = 0 prikoll = false function main() while not isSampAvailable() do wait(0) end sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43) while true do wait(0) if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then while isKeyDown(75) do wait(0) end if(active_report == 2) then sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d) sampSendChat("/"..cmd.." "..paramssss) status("true", 1) wait(1000) sampSendChat("/a [Forma] +") active_report2 = 1 end end end end function event.onServerMessage(color, text) end local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'} for k,v in ipairs(reasons) do if text:match("%[.*%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s") then started = started + 1 if started < 2 then prikoll = true admin_nick, admin_id, other = text:match("%[.+%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s(.*)") cmd = v paramssss = other if stop == 0 then lua_thread.create(function() for i = 0, 5 do if active_report2 == 0 then status("false", i) else status("true", i) end end if prikoll then wait(550) printStyledString("You missed form", 1000, 5) active_report = 1 active_report2 = 0 started = 0 bbstart = -1 end end) end end end end function status(parsasm, ggbc) if parsasm then active_report2 = 1 prikoll = false if ggbc == 5 then active_report2 = 0 started = 0 end active_report = 1 printStyledString("Admin form accepted", 5000, 5) bbstart = -1 else bbstart = -1 bbstart = bbstart + ggbc if bbstart == 0 then active_report = 2 end if active_report2 == 0 then wait(1000) printStyledString('Admin form '..ggbc.." wait", 1000, 5) end end end
Понял как ты сделалне работает чет
ИсправилКакое же это ...
код выравнял и убрал баги но по факту работать не будет т.к ты нахуярил все подряд
Lua:local event = require('lib.samp.events') stop = 0 started = 0 prinato = 0 active_report = 0 active_report2 = 0 prikoll = false function main() while not isSampAvailable() do wait(0) end sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43) while true do wait(0) if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then while isKeyDown(75) do wait(0) end if(active_report == 2) then sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d) sampSendChat("/"..cmd.." "..paramssss) status("true", 1) wait(1000) sampSendChat("/a [Forma] +") active_report2 = 1 end end end end local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'} function event.onServerMessage(color, text) for k,v in ipairs(reasons) do if text:match("%[.*%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s") then started = started + 1 if started < 2 then prikoll = true admin_nick, admin_id, other = text:match("%[.+%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s(.*)") cmd = v paramssss = other if stop == 0 then lua_thread.create(function() for i = 0, 5 do if active_report2 == 0 then status("false", i) else status("true", i) end end if prikoll then wait(550) printStyledString("You missed form", 1000, 5) active_report = 1 active_report2 = 0 started = 0 bbstart = -1 end end) end end end end end function status(parsasm, ggbc) if parsasm then active_report2 = 1 prikoll = false if ggbc == 5 then active_report2 = 0 started = 0 end active_report = 1 printStyledString("Admin form accepted", 5000, 5) bbstart = -1 else bbstart = -1 bbstart = bbstart + ggbc if bbstart == 0 then active_report = 2 end if active_report2 == 0 then wait(1000) printStyledString('Admin form '..ggbc.." wait", 1000, 5) end end end
Понял как ты сделал
Исправил
Но чует мое очко то что ты хуню написал
![]()
оно работает но не выполняет команду, вчера работало выключил пк не сохранив и по пизде
оно работает и приветствие делает но я когда пишу /a /slap 116 то просто form accepted а нужно чтобы я подтвердил на 75(K) кнопку и оно потом еще написало в чат /a [form] +
local event = require('lib.samp.events')
stop = 0
started = 0
prinato = 0
active_report = 0
active_report2 = 0
prikoll = false
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43)
while true do wait(0)
if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
while isKeyDown(75) do wait(0) end
if(active_report == 2) then
sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d)
sampSendChat("/"..cmd.." "..paramssss)
status("true", 1)
wait(1000)
sampSendChat("/a [Forma] +")
active_report2 = 1
end
end
end
end
local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'}
function event.onServerMessage(color, text)
for k,v in ipairs(reasons) do
if text:match("%[.*%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s") then
started = started + 1
if started < 2 then
prikoll = true
admin_nick, admin_id, other = text:match("%[.+%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s(.*)")
cmd = v
paramssss = other
if stop == 0 then
lua_thread.create(function()
for i = 0, 5 do
if active_report2 == 0 then
status("false", i)
else
status("true", i)
end
end
if prikoll then
wait(550)
printStyledString("You missed form", 1000, 5)
active_report = 1
active_report2 = 0
started = 0
bbstart = -1
end
end)
end
end
end
end
end
function status(parsasm, ggbc)
if parsasm == "true" then
active_report2 = 1
prikoll = "false"
if ggbc == 5 then
active_report2 = 0
started = 0
end
active_report = 1
printStyledString("Admin form accepted", 5000, 5)
bbstart = -1
else
bbstart = -1
bbstart = bbstart + ggbc
if bbstart == 0 then
active_report = 2
end
if active_report2 == 0 then
wait(1000)
printStyledString('Admin form '..ggbc.." wait", 1000, 5)
end
end
end
local event = require('lib.samp.events')
stop = 0
started = 0
prinato = 0
active_report = 0
active_report2 = 0
prikoll = false
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43)
while true do wait(0)
if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then
if(active_report == 2) then
sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d)
sampSendChat("/"..cmd.." "..paramssss)
status(true, 1)
wait(1000)
sampSendChat("/a [Forma] +")
active_report2 = 1
end
end
end
end
local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'}
function event.onServerMessage(color, text)
lua_thread.create(function()
for k,v in ipairs(reasons) do
local mess = '%[.*%] ([A-Za-z0-9_]+)%[(%d+)%]%: /'..v..'%s*(.*)'
if string.match(text,mess) then
started = started + 1
if started < 2 then
prikoll = true
admin_nick, admin_id, other = string.match(text,mess)
cmd = v
paramssss = other
if stop == 0 then
for i = 0, 5 do
if active_report2 == 0 then
status(false, i)
else
status(true, i)
end
end
if prikoll then
wait(550)
printStyledString("You missed form", 1000, 5)
active_report = 1
active_report2 = 0
started = 0
bbstart = -1
end
end
end
end
end
end)
end
function status(parsasm, ggbc)
if parsasm then
active_report2 = 1
prikoll = false
if ggbc == 5 then
active_report2 = 0
started = 0
end
active_report = 1
printStyledString("Admin form accepted", 5000, 5)
bbstart = -1
else
bbstart = -1
bbstart = bbstart + ggbc
if bbstart == 0 then
active_report = 2
end
if active_report2 == 0 then
wait(1000)
printStyledString('Admin form '..ggbc.." wait", 1000, 5)
end
end
end
Ты зачемПосмотреть вложение 175432
оно работает но не выполняет команду, вчера работало выключил пк не сохранив и по пизде
оно работает и приветствие делает но я когда пишу /a /slap 116 то просто form accepted а нужно чтобы я подтвердил на 75(K) кнопку и оно потом еще написало /a [form] +
все, я починил
вот код:local event = require('lib.samp.events') stop = 0 started = 0 prinato = 0 active_report = 0 active_report2 = 0 prikoll = false function main() while not isSampAvailable() do wait(0) end sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43) while true do wait(0) if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then while isKeyDown(75) do wait(0) end if(active_report == 2) then sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d) sampSendChat("/"..cmd.." "..paramssss) status("true", 1) wait(1000) sampSendChat("/a [Forma] +") active_report2 = 1 end end end end local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'} function event.onServerMessage(color, text) for k,v in ipairs(reasons) do if text:match("%[.*%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s") then started = started + 1 if started < 2 then prikoll = true admin_nick, admin_id, other = text:match("%[.+%] (%w+_?%w+)%[(%d+)%]%: /"..v.."%s(.*)") cmd = v paramssss = other if stop == 0 then lua_thread.create(function() for i = 0, 5 do if active_report2 == 0 then status("false", i) else status("true", i) end end if prikoll then wait(550) printStyledString("You missed form", 1000, 5) active_report = 1 active_report2 = 0 started = 0 bbstart = -1 end end) end end end end end function status(parsasm, ggbc) if parsasm == "true" then active_report2 = 1 prikoll = "false" if ggbc == 5 then active_report2 = 0 started = 0 end active_report = 1 printStyledString("Admin form accepted", 5000, 5) bbstart = -1 else bbstart = -1 bbstart = bbstart + ggbc if bbstart == 0 then active_report = 2 end if active_report2 == 0 then wait(1000) printStyledString('Admin form '..ggbc.." wait", 1000, 5) end end end
Boolean
превратил в String
?щас исправлюНа попробуй хз надолго ли
проверил у меня работаетLua:local event = require('lib.samp.events') stop = 0 started = 0 prinato = 0 active_report = 0 active_report2 = 0 prikoll = false function main() while not isSampAvailable() do wait(0) end sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43) while true do wait(0) if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then if(active_report == 2) then sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d) sampSendChat("/"..cmd.." "..paramssss) status(true, 1) wait(1000) sampSendChat("/a [Forma] +") active_report2 = 1 end end end end local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'} function event.onServerMessage(color, text) lua_thread.create(function() for k,v in ipairs(reasons) do local mess = '%[.*%] ([A-Za-z0-9_]+)%[(%d+)%]%: /'..v..'%s*(.*)' if string.match(text,mess) then started = started + 1 if started < 2 then prikoll = true admin_nick, admin_id, other = string.match(text,mess) cmd = v paramssss = other if stop == 0 then for i = 0, 5 do if active_report2 == 0 then status(false, i) else status(true, i) end end if prikoll then wait(550) printStyledString("You missed form", 1000, 5) active_report = 1 active_report2 = 0 started = 0 bbstart = -1 end end end end end end) end function status(parsasm, ggbc) if parsasm then active_report2 = 1 prikoll = false if ggbc == 5 then active_report2 = 0 started = 0 end active_report = 1 printStyledString("Admin form accepted", 5000, 5) bbstart = -1 else bbstart = -1 bbstart = bbstart + ggbc if bbstart == 0 then active_report = 2 end if active_report2 == 0 then wait(1000) printStyledString('Admin form '..ggbc.." wait", 1000, 5) end end end
Ты зачем[B]Boolean[/B]
превратил в[B]String[/B]
?
а ты где нашел это?На попробуй хз надолго ли
проверил у меня работаетLua:local event = require('lib.samp.events') stop = 0 started = 0 prinato = 0 active_report = 0 active_report2 = 0 prikoll = false function main() while not isSampAvailable() do wait(0) end sampAddChatMessage('[FORM]: Привет братик! Я начала свою работу! Люблю<3', 0xFAEE43) while true do wait(0) if isKeyDown(75) and not sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() then if(active_report == 2) then sampAddChatMessage('[FORM] Выполняю братик<3', 0xFFff004d) sampSendChat("/"..cmd.." "..paramssss) status(true, 1) wait(1000) sampSendChat("/a [Forma] +") active_report2 = 1 end end end end local reasons = {"kick", "mute", "jail", "jailoff", "sethp", "sban", "banoff", "muteoff", "sbanoff", "spawn", "slap", "unmute", "unjail", "sban", "spcar", "ban", "sban", "warn", "skick", "setskin", "ao", "unban", "unwarn", "setskin", "skick", "banip", "offban", "offwarn", "plveh", "sban", "ptp", "o", "aad", "givegun", "avig", "aunvig", "setadmin", "givedonate", "spawncars", "mpwin", "prefix", "asellhouse", "delacc", "asellbiz", "money", "avig", "aunvig", 'iban'} function event.onServerMessage(color, text) lua_thread.create(function() for k,v in ipairs(reasons) do local mess = '%[.*%] ([A-Za-z0-9_]+)%[(%d+)%]%: /'..v..'%s*(.*)' if string.match(text,mess) then started = started + 1 if started < 2 then prikoll = true admin_nick, admin_id, other = string.match(text,mess) cmd = v paramssss = other if stop == 0 then for i = 0, 5 do if active_report2 == 0 then status(false, i) else status(true, i) end end if prikoll then wait(550) printStyledString("You missed form", 1000, 5) active_report = 1 active_report2 = 0 started = 0 bbstart = -1 end end end end end end) end function status(parsasm, ggbc) if parsasm then active_report2 = 1 prikoll = false if ggbc == 5 then active_report2 = 0 started = 0 end active_report = 1 printStyledString("Admin form accepted", 5000, 5) bbstart = -1 else bbstart = -1 bbstart = bbstart + ggbc if bbstart == 0 then active_report = 2 end if active_report2 == 0 then wait(1000) printStyledString('Admin form '..ggbc.." wait", 1000, 5) end end end
Ты зачемBoolean
превратил вString
?
String
бля можешь вк свой сказать там быстрее