• Ищем качественного (не новичок) разработчиков Xenforo для этого форума! В идеале, чтобы ты был фулл стек программистом. Если у тебя есть что показать, то свяжись с нами по контактным данным: https://t.me/DREDD

Вопрос Nixware луа как ускорить клантег

  • Автор темы Автор темы u11
  • Дата начала Дата начала
Участник
Участник
Статус
Оффлайн
Регистрация
2 Фев 2019
Сообщения
1,183
Реакции
230
Код:
Expand Collapse Copy
--variables
local last_timer = 0

local firstStart = true

local last_current_time = 0 --this is for clantag sync
local timer = 0 --timer so we can animate our clantag later
local function paint() -- this is not perfect and can have problems
    
     local curtime = globalvars.get_current_time() -- returns the server timee
      

 
     if curtime < last_current_time then -- u can remove the math.floor if u want
        --do nothing
    else
        --start counting
          --client.notify("another iteration")
  
      
    

        timer = math.ceil(curtime % 10)
        

       last_current_time = curtime + 1

     local clantag = ""
-- retarded

     if timer == 0 then -- basicly a switch statement but gay
         clantag = " "
     elseif timer == 1 then
         clantag =  "f "
     elseif timer == 2 then
         clantag =  "fa "
     elseif timer == 3 then
         clantag =  "fat "
     elseif timer == 4 then
         clantag =  "fata "
     elseif timer == 5 then
         clantag =  "fatal "
     elseif timer == 6 then
         clantag =  "fatali "
     elseif timer == 7 then
         clantag =  "fatalit "
     elseif timer == 8 then
         clantag =  "fatality "
     end
    
     --then we will take last number from our elseif
     --then if timer is bigger than 10, reset it to 0 so our clantag can go again from 0
  
  
        
        if engine.is_in_game() and entitylist.get_entity_by_index(engine.get_local_player()) then
        


--client.notify("clantag setted")

        se.set_clantag(clantag)
        
    end
   end

    
end

client.register_callback("paint", paint)
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
timer = math.ceil(curtime % 10)
last_current_time = curtime + 1
 
Назад
Сверху Снизу