Вопрос /me /roll /ooc

  • 27
  • 1
Контакты для связи отсутствуют.
Так, а как ты понял, что оно сломано? Ошибка в консоль должна была быть
покажу еще раз код:

Lua:
timer.Simple( 30, function()
    DarkRP.addPhrase('en', 'do')
    DarkRP.removeChatCommand("do")
        local function PlayerNonRpChat(ply, args)
            if args == "" then
                DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
                return ""
            end
            local DoSay = function(text)
                if text == "" then
                    DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
                    return ""
                end
                DarkRP.talkToRange(ply, Color(255, 178, 75) .. "[/do] " .. text, ply:Nick())
                --DarkRP.talkToRange(ply, "(" .. DarkRP.getPhrase("do") .. ") " .. ply:Nick(), text, 250)
        end
        return args, DoSay
    end
    DarkRP.declareChatCommand{
        command = "do",
        description = "Advertise something to everyone in the server.",
        delay = 1.5
    }
    if SERVER then
        DarkRP.defineChatCommand("do", PlayerNonRpChat, 1.5)
    end
end)
 
  • 27
  • 1
Контакты для связи отсутствуют.
Так, а как ты понял, что оно сломано? Ошибка в консоль должна была быть
error:
[![core] drp] addons/![core] drp/lua/autorun/command-do.lua:14: attempt to concatenate a table value
  1. DoSayFunc - addons/![core] drp/lua/autorun/command-do.lua:14
   2. Run - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:254
    3. SendGlobalMessage - addons/[visual] chat/lua/easychat/networking.lua:73
     4. ReceiveGlobalMessage - addons/[visual] chat/lua/easychat/networking.lua:215
      5. func - addons/[visual] chat/lua/easychat/networking.lua:236
       6. unknown - lua/includes/extensions/net.lua:38
 
покажу еще раз код:

Lua:
timer.Simple( 30, function()
    DarkRP.addPhrase('en', 'do')
    DarkRP.removeChatCommand("do")
        local function PlayerNonRpChat(ply, args)
            if args == "" then
                DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
                return ""
            end
            local DoSay = function(text)
                if text == "" then
                    DarkRP.notify(ply, 1, 4, DarkRP.getPhrase("invalid_x", "argument", ""))
                    return ""
                end
                DarkRP.talkToRange(ply, Color(255, 178, 75) .. "[/do] " .. text, ply:Nick())
                --DarkRP.talkToRange(ply, "(" .. DarkRP.getPhrase("do") .. ") " .. ply:Nick(), text, 250)
        end
        return args, DoSay
    end
    DarkRP.declareChatCommand{
        command = "do",
        description = "Advertise something to everyone in the server.",
        delay = 1.5
    }
    if SERVER then
        DarkRP.defineChatCommand("do", PlayerNonRpChat, 1.5)
    end
end)
Попробуй убрать комментарий в --DarkRP.talkToRange(ply, "(" .. DarkRP.getPhrase("do") .. ") " .. ply:Nick(), text, 250), а прошлую строку наоборот в комментарий
 
Активность
Пока что здесь никого нет
Сверху Снизу