[Урок Lua] Random - Форум Cheat-Master.ru
  • Страница 1 из 1
  • 1
Модератор форума: Admin_Bot, Admin_Bot2, Admin_Bot3, Admin_Bot4  
[Урок Lua] Random
[CM]SeveN[Tawer] Дата: Среда, 21.06.2017, 11:32 | Сообщение # 1
Новичок
Сообщений: 12
Статус: Offline
Код
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end  -- Проверка на загруженный самп
    while not isSampAvailable() do wait(100) end
     sampRegisterChatCommand("rtext", random1) -- Рег. Кмд.
     wait(-1)
end

function random1() -- Cmd
local textA = math.random(0,2) -- Мин число 0, макс число 2
if textA == 0 then -- Если выпало число 0, то
   sampfuncsLog("{ad1d1d}Text") -- Добавляем лог с красным цветом
else
     if textA == 1 then -- Если 1, то
       sampfuncsLog("{2fb7dd}Text2") -- С синим
     else
         if textA == 2 then -- А если 2, то
           sampfuncsLog("{2fdd35}Text3") -- С зеленым
         end
     end
end
end


:)


[url='https://vk.com/damonx'][img]https://i.imgur.com/9gF7zX3.jpg[/img][/url][url='http://cheat-master.ru/index/8-465304'][img]https://i.imgur.com/L0c5cva.jpg[/img][/url]
  • Страница 1 из 1
  • 1
Поиск:
Статистика Форума
Лучшие пользователи
Admin [39113]

GеNius [7210]

[CM]Russel [5557]

kenlo763 [4952]

[CM]AGRESSOR [4639]

Snake_Firm [4452]

Сэс [4416]

Artem_Buero [4223]

[CM]Durman [3204]

[CM]Рафаэль [3080]

iMaddy [2857]

sky_Woker [2854]

getrekt [2745]

Новые пользователи
Virti_Evolve [14:06]

AlexanderScied [09:50]

Andry989095 [20:39]

Robertexcig [17:52]

Nicholascat [10:29]

Danielcal [01:17]

Xalig304 [19:31]

Alex31enake [03:53]

gfhfghgfhfgh [01:47]

kilarmaksik111 [12:35]

grogrt70 [12:28]

kilarmaksik [12:17]

dukhvahakaurnukaev [21:47]