На ваш бан.
-
Автор темы
- #1
code_language.lua:
-- updater: anthologie
-- Improved by: ListerStellar#0017
local messagesENG = {
*trashtalk text*
}
local messagesRU = {
*trashtalk text*
}
local trashfacts = {
*trashtalk text*
}
client.notify("Trashtalk 1.0 Update")
--local trashtalk_enabled = ui.add_check_box("Enable Trashtalk", "trashtalk_enabled", false)
local trashtalk_type = ui.add_combo_box("Trashtalk type", "trashtalk_type", { "Off", "Russian", "English", "Trashfacts[RU]" }, 0)
client.register_callback("player_death", function(event)
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()
math.randomseed(os.clock()*100000000000)
if attacker_index == me and died_index ~= me then
if trashtalk_type:get_value() == 1 then
engine.execute_client_cmd("say " .. tostring(messagesRU[math.random(0, #messagesRU)]))
elseif trashtalk_type:get_value() == 2 then
engine.execute_client_cmd("say " .. tostring(messagesENG[math.random(0, #messagesENG)]))
elseif trashtalk_type:get_value() == 3 then
engine.execute_client_cmd("say " .. tostring(trashfacts[math.random(0, #trashfacts)]))
end
end
end)
RU: Обычный трештолк с выбором типа: Russian(трештолк на русском), English(трештолк на английском), Trashfacts[RU](интересные факты на русском).
EN: Simple trashtalk with type choose: Russian(trashtalk on russian language), English(trashtalk on English language), Trashfacts[RU](interesting facts on russian language).
DW:
Вложения
-
26.5 KB Просмотры: 2,274