Я хочу сделать трештолк, но не просто. Но есть проблема

TMFHSPgod

SC0R3D gang <3
Registered
Регистрация
6 Дек 2019
Сообщения
262
Вообщем, сделал вот так1613289680558.png,но когда включаю и убиваю, не работает. Я хз пацаны. https://nixware.cc/threads/14908/ взял за основу эту луа.
Где "-----", там будет сам трештолк
Код:
-- Made SC0R3D --
local messages = {
    {
        "-------",
        "-------"

    }
}

local kill_spam = ui.add_combo_box("Enable Killsay", "misc_killsay", {
    "off",
    "on"
}, 0)



function Killsay(event)
local kill_spamn = kill_spam:get_value()
local includpe = include:get_value()
local custom_say = text_input:get_value()


    if kill_spamn == 0 then
        return
    end
  
    if event:get_name() ~= "player_death" then
        return
    end 

    local attacker_index = engine.get_player_for_user_id(event:get_int("attacker",0))
    local died_index = engine.get_player_for_user_id(event:get_int("userid",1))
    local me = engine.get_local_player() 
    local died_info = engine.get_player_info(died_index)
  
  
  
        if attacker_index == me and died_index ~= me then
      
            local text = ""         
          
            if includpe then
               text = died_info.name .. ", "
            end         
          
            if messages[kill_spamn] then
                local message = messages[kill_spamn]

                text = text .. message[client.random_int(1, #message)]
            else
                text = text .. custom_say
            end

            engine.execute_client_cmd("say " .. text)
      
        end
end

client.register_callback("fire_game_event",Killsay)
 
у тебя есть
local includpe = include:get_value()
local custom_say = text_input:get_value()

но сами include и text_input у тебя необъявлены в скрипте
 
у тебя есть
local includpe = include:get_value()
local custom_say = text_input:get_value()

но сами include и text_input у тебя необъявлены в скрипте
у тебя есть
local includpe = include:get_value()
local custom_say = text_input:get_value()

но сами include и text_input у тебя необъявлены в скрипте
Спасибо!
 
Назад
Сверху