- 16
- 0
во общем хочу погрузится в разработку луа скриптинга, пишу тест скрипт для проверки на личном сервере, и столкнулся с проблемой, команды не работают, знающие люди помогите!
В логах ничего сверхъестественного не нашел
lua:
script_name("Admin Helper CMD")
script_author("devodrag")
script_version("1.0.0")
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage(string.format"[ACMD] {ffffff} Доброго времени суток! У вас стоит последняя версия!", 0xff410d)
sampRegisterChatCommand("test", test)
sampRegisterChatCommand("scripttest", scripttest)
end
function test(id)
sampSendChat('/mute' .. id .. '1' .. 'Test')
sampAddChatMessage(string.format"[ACMD] {ffffff} Игрок был замучен.", 0xff410d)
sampSendChat('/unmute' .. id)
sampAddChatMessage(string.format"[ACMD] {ffffff} Игрок был размучен", 0xff410d)
end
function scripttest()
sampAddChatMessage(string.format"[ACMD] {ffffff} Скрипт в рабочем состоянии!", 0xff410d)
end