- 231
- 295
- Версия MoonLoader
- .027.0-preview
Lua:
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("mycmd", cmd_mycmd)
while true do wait(0)
if act == true then
print(arg)
end
end
end
act = false
function cmd_mycmd(arg)
if #arg == 0 then
print("Command 'mycmd' syntax: /mycmd [something]")
else
print("MyCmd: input = " .. arg)
act = true
end
end
Почему-то возвращает nil в main функции