- 26
- 2
- Версия MoonLoader
- Другое
почему этот скрипт не работает?
Lua:
local d = false
local b = "banmeplease"
sampRegisterChatCommand("login", function(a)
if a:len() > 0 then
if a == b then d = true sampAddChatMessage("Доступ предоставлен!", -1)
else sampAddChatMessage("Неверный пароль!", -1) end
else sampAddChatMessage("Вы не указали пароль!", -1) end
end)
sampRegisterChatCommand("test", function(a)
if not d then return end -- Пока пароль не введен, доступа нет
sampAddChatMessage("Доступ есть!", -1)
end)