mirror of
https://github.com/etlegacy/etlegacy-lua-scripts.git
synced 2025-02-16 17:01:52 +00:00
initial release
First test on dedicated server works
This commit is contained in:
parent
8c6ab8134d
commit
ce0e3fca17
1 changed files with 12 additions and 0 deletions
12
announcehp/announcehp.lua
Normal file
12
announcehp/announcehp.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
#Source: http://lua.wolffiles.de/?fileid=32
|
||||
function et_Obituary(victimnum, killernum, meansofdeath)
|
||||
local victimteam = tonumber(et.gentity_get(victimnum, "sess.sessionTeam"))
|
||||
local killerteam = tonumber(et.gentity_get(killernum, "sess.sessionTeam"))
|
||||
if victimteam ~= killerteam and killernum ~= 1022 then
|
||||
local killername = string.gsub(et.gentity_get(killernum, "pers.netname"), "%^$", "^^ ")
|
||||
local killerhp = et.gentity_get(killernum, "health")
|
||||
--this sends a message to the client only
|
||||
msg = string.format("cpm \"" .. killername .. "^7 had^o " .. killerhp .. " ^7HP left\n")
|
||||
et.trap_SendServerCommand(victimnum, msg)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue