- 8
- 1
Как в этом коде сделать так, чтобы скрипт активировался только по команде /acchas?
Lua:
local c_acchas = false
local hi = "Deleysov = molodec"
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage("[AutoCchas] script loaded", 0xFFFFFF)
sampAddChatMessage("Deleysov - molodec", 0xFFFFFF)
sampRegisterChatCommand("acchas", c_acchas)
end
local sampev = require('lib.samp.events')
local c_acchas = false
function c_acchas (arg)
if c_acchas == false then
sampAddChatMessage("AutoCchas by necro not activated", 0xFF0000)
else
sampAddChatMessage("AutoCchas by necro activated", 0x00CC00)
if (text:find("/cchas")) then
lua_threads.create(function()
wait(1500)
sampSendChat("/cchas")
end)
end
end
end