life is cheap, death is free!
-
Автор темы
- #1
Откуда взята идея? https://yougame.biz/threads/246011/
ну собственно вот, написал за краткий промежуток времени потому что было ебать как скучно
killsound закидывать в
steam\steamapps\common\Counter-Strike Global Offensive\csgo\sound
Код:
local totalkills = 0
local headshot = 0
local sound = {
"1",
"second",
"3",
"4",
"5",
"6"
}
Cheat.RegisterCallback("client_disconnect", function()
totalkills = 0
end)
Cheat.RegisterCallback("player_connect_full", function()
totalkills = 0
end)
Cheat.RegisterCallback("round_prestart", function()
totalkills = 0
end)
Cheat.RegisterCallback("round_start", function()
totalkills = 0
end)
Cheat.RegisterCallback("player_death", function(e)
local attacker = EntityList.GetPlayerForUserID(e:Get("attacker"))
local dead = EntityList.GetPlayerForUserID(e:Get("userid"))
local player = EngineClient.GetLocalPlayer()
if player == dead then
totalkills = 0
end
if attacker == player and player ~= dead then
headshot = e:Get("headshot")
totalkills = totalkills + 1
if totalkills > 6 then totalkills = 6 end
if headshot == 0 then
EngineClient.ExecuteClientCmd("play killsound/" .. sound[totalkills] .. ".wav")
else
EngineClient.ExecuteClientCmd("play killsound/headkill")
end
end
end)
killsound закидывать в
steam\steamapps\common\Counter-Strike Global Offensive\csgo\sound
Вложения
-
692.5 KB Просмотры: 53