Как мне написать трештолк который пишится с зодержкой?(NL)

  • 122
  • 62
Lua:
local tick = globals.get_tickcount();

local print = function()
    if ((tick % 3) == 4 then -- к примеру 4
        cheat.print("jw8utghj284tgu24hjo");
    end
end
client.add_callback("create_move", print)
какое же это говно пиздец... кроме того что у тебя это даже не на ивенте срабатывает, так еще и спамить просто так будет, потому что у тебя переменная с тиккаунтом вне функции
 
  • 122
  • 62
Код:
 local phrases = {
    "1.",
    "owned"
}

local function get_phrase()
    return phrases[Utils.RandomInt(1, #phrases)]:gsub('\"', '')
end

Cheat.RegisterCallback("events", function(event)
    if event:GetName() ~= "player_death" then return end
tick = GlobalVars.tickcount
if ((tick % 3) == 4 then - 4
    local me = EntityList.GetLocalPlayer()
    local victim = EntityList.GetPlayerForUserID(event:GetInt("userid"))
    local attacker = EntityList.GetPlayerForUserID(event:GetInt("attacker"))

    if victim == attacker or attacker ~= me then return end

    EngineClient.ExecuteClientCmd('say "' .. get_phrase() .. '"')
end
end)
писать оно, к слову, будет после кила если (tick % 3) == 4, так что это тоже нерабочий варинат
 
  • 31
  • 2
Код:
 local phrases = {
    "1.",
    "owned"
}

local function get_phrase()
    return phrases[Utils.RandomInt(1, #phrases)]:gsub('\"', '')
end

Cheat.RegisterCallback("events", function(event)
    if event:GetName() ~= "player_death" then return end
tick = GlobalVars.tickcount
if ((tick % 3) == 4 then - 4
    local me = EntityList.GetLocalPlayer()
    local victim = EntityList.GetPlayerForUserID(event:GetInt("userid"))
    local attacker = EntityList.GetPlayerForUserID(event:GetInt("attacker"))

    if victim == attacker or attacker ~= me then return end

    EngineClient.ExecuteClientCmd('say "' .. get_phrase() .. '"')
end
end)
Не работает(
 
Активность
Пока что здесь никого нет
Сверху Снизу