Merge pull request #4 from estorado/master

Add modname and version to lua
This commit is contained in:
IR4T4 2016-02-06 17:12:07 +01:00
commit e0f0e71daf
2 changed files with 20 additions and 1 deletions

View file

@ -1,6 +1,6 @@
# Lua scripts
Lua scripts for the Legacy mod
* Lua scripts for the Legacy mod.
## CONSTANTS
@ -39,3 +39,15 @@ Lua scripts for the Legacy mod
## announcehp
* Killer's HP is displayed to their victims.
# Notes
* Please always add modname and version to your lua script
```
modname="NameofLua"
version="1.0"
function et_InitGame()
et.RegisterModname(modname.." "..version)
end
```

View file

@ -1,4 +1,11 @@
--Source: http://lua.wolffiles.de/?fileid=32
modname="AnnounceHP"
version="1.0"
function et_InitGame()
et.RegisterModname(modname.." "..version)
end
function et_Obituary(victimnum, killernum, meansofdeath)
local victimteam = tonumber(et.gentity_get(victimnum, "sess.sessionTeam"))
local killerteam = tonumber(et.gentity_get(killernum, "sess.sessionTeam"))