0x25E90B80
-
Автор темы
- #1
Пожалуйста, авторизуйтесь для просмотра ссылки.
code_language.lua:
local messages = {
"fuck1"
"fuck2"
"fuck3"
"fuck4"
}
local trashtalkEnable = ui.add_check_box("Enable trashtalk", "trashtalk_checkbox", false)
local function trashtalk()
local attackerIndex = engine.get_player_for_user_id(event:get_int("attacker", 0))
local diedIndex = engine.get_player_for_user_id(event:get_int("userid", 1))
local me = engine.get_local_player()
if trashtalkEnable == true then
if attackerIndex == me and diedIndex ~= me then
engine.execute_client_cmd("say " .. tostring(messages[math.random(0, messages)]))
end
end
end
client.register_callback("paint", trashtalk)