announce players hp left
Moderators: Forum moderators, developers
announce players hp left
Im runing two populers server in Norway. I was woundering if there is a way to get the server to tell how mutch hp the player had left, when you are killed by him
I see many players asking the other player how mutch hp he had left,after the duell.
so it would be nice to let the server tell it
And is there any map scripts that dont let players blow up the objectiv
so i can have on my frag server ?
And i was woundering if anyone can tell we what to change in fueldump.script so this change can be in my server
becuse we will keep the snow map but like to have this settings on it
// arni - 09.07.2006 - Added playerclips to avoid all sorts of fueljumps
// arni - 09.07.2006 - Added spawnpt 3 - depot, truck, 3 positions
// arni - 09.07.2006 - Broke one garage gate to only close half way
Mummy
84.49.16.39:27960 *CwG*House Of Frags
84.49.16.39:27961 *CwG*Fueldump 24/7
You are welcome to come and play with us here
I see many players asking the other player how mutch hp he had left,after the duell.
so it would be nice to let the server tell it
And is there any map scripts that dont let players blow up the objectiv
so i can have on my frag server ?
And i was woundering if anyone can tell we what to change in fueldump.script so this change can be in my server
becuse we will keep the snow map but like to have this settings on it
// arni - 09.07.2006 - Added playerclips to avoid all sorts of fueljumps
// arni - 09.07.2006 - Added spawnpt 3 - depot, truck, 3 positions
// arni - 09.07.2006 - Broke one garage gate to only close half way
Mummy
84.49.16.39:27960 *CwG*House Of Frags
84.49.16.39:27961 *CwG*Fueldump 24/7
You are welcome to come and play with us here
Re: announce players hp left
You could proably do this with a lua mod*CwG*Mummy wrote:Im runing two populers server in Norway. I was woundering if there is a way to get the server to tell how mutch hp the player had left, when you are killed by him
I see many players asking the other player how mutch hp he had left,after the duell.
so it would be nice to let the server tell it
This should be very easy to do yourself.And is there any map scripts that dont let players blow up the objectiv
so i can have on my frag server ?
There are a lot of fueldump scripts, it's not clear which one you are talking about.And i was woundering if anyone can tell we what to change in fueldump.script so this change can be in my server
send lawyers, guns and money
Re: announce players hp left
Im talking about that i have this in my fueldump script todayReyalP wrote:You could proably do this with a lua mod*CwG*Mummy wrote:Im runing two populers server in Norway. I was woundering if there is a way to get the server to tell how mutch hp the player had left, when you are killed by him
I see many players asking the other player how mutch hp he had left,after the duell.
so it would be nice to let the server tell it
This should be very easy to do yourself.And is there any map scripts that dont let players blow up the objectiv
so i can have on my frag server ?
There are a lot of fueldump scripts, it's not clear which one you are talking about.And i was woundering if anyone can tell we what to change in fueldump.script so this change can be in my server
// ============================================================================
// Map: Fueldump
// Last update : 16/06/03 Sock
// ============================================================================
// rain - Tue Sep 23 20:24:55 EDT 2003 - fixed setautospawns
// bani - Mon Jan 5 23:45:25 PST 2004 - allied spawn at garage commandpost
// mortis - Fri Jun 24 18:11:58 PDT 2005 - set allied autospawn to HQ by default at spline 73
// 2/3Soul - Sat Jan 15 17:12:56 GMT 2005 - east depot defences only partially constructable
// mortis - Thu Sep 15 20:30:20 PDT 2005 - merged 2/3 soul features and mortis features
// [C.W.G]Mummy - Thu jan 12 13:30:20 PDT 2006 - Add Stairs with Axis First Spawan www.cwg-et.com
And i woud like to have
// arni - 09.07.2006 - Broke one garage gate to only close half way
// arni - 09.07.2006 - Added playerclips to avoid all sorts of fueljumps
// arni - 09.07.2006 - Added spawnpt 3 - depot, truck, 3 positions
in it to
Mummy
83.243.82.119:27960 cwG`House Of Frags
-
- Posts: 5
- Joined: Wed Jul 05, 2006 3:01 am
Re: announce players hp left
- save following code as announcekillershealth.lua to ur etpro folder*CwG*Mummy wrote:I was woundering if there is a way to get the server to tell how mutch hp the player had left, when you are killed by him
I see many players asking the other player how mutch hp he had left,after the duell.
so it would be nice to let the server tell it
Code: Select all
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")
et.trap_SendServerCommand(victimnum, string.format("cp "^7Your ^7killer ^7%s ^7has ^7still ^o%d ^7health ^7points ^7remaining.\n"", killername, killerhp))
end
end
- restart your server
to display some other text to the victim feel free to edit line 9 ...
have phun
Re: announce players hp left
Tanks alot for this and it works but then my killingspree sounds stops workingPhenomenon wrote:- save following code as announcekillershealth.lua to ur etpro folder*CwG*Mummy wrote:I was woundering if there is a way to get the server to tell how mutch hp the player had left, when you are killed by him
I see many players asking the other player how mutch hp he had left,after the duell.
so it would be nice to let the server tell it
- add set lua_modules "announcekillershealth.lua" to your server configurationCode: Select all
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") et.trap_SendServerCommand(victimnum, string.format("cp "^7Your ^7killer ^7%s ^7has ^7still ^o%d ^7health ^7points ^7remaining.\n"", killername, killerhp)) end end
- restart your server
to display some other text to the victim feel free to edit line 9 ...
have phun
I have this in my config
setl lua_modules "playsound.lua"
setl lua_modules "announcekillershealth.lua"
setl lua_allowedmodules ""
it this OK ?
Mummy
83.243.82.119:27960 cwG`House Of Frags
-
- Posts: 5
- Joined: Wed Jul 05, 2006 3:01 am
simply add
to your config
Code: Select all
set lua_modules "playsound.lua announcekillershealth.lua"
Tanks alot for this and it works:)Phenomenon wrote:simply add
to your configCode: Select all
set lua_modules "playsound.lua announcekillershealth.lua"
83.243.82.119:27960 cwG`House Of Frags
Re: announce players hp left
So find the relavent bits of mapscript code (using some kind of diff/merge tool) and merge them.*CwG*Mummy wrote:============================================================================
// Map: Fueldump
// Last update : 16/06/03 Sock
// ============================================================================
// rain - Tue Sep 23 20:24:55 EDT 2003 - fixed setautospawns
// bani - Mon Jan 5 23:45:25 PST 2004 - allied spawn at garage commandpost
// mortis - Fri Jun 24 18:11:58 PDT 2005 - set allied autospawn to HQ by default at spline 73
// 2/3Soul - Sat Jan 15 17:12:56 GMT 2005 - east depot defences only partially constructable
// mortis - Thu Sep 15 20:30:20 PDT 2005 - merged 2/3 soul features and mortis features
// [C.W.G]Mummy - Thu jan 12 13:30:20 PDT 2006 - Add Stairs with Axis First Spawan www.cwg-et.com
And i woud like to have
// arni - 09.07.2006 - Broke one garage gate to only close half way
// arni - 09.07.2006 - Added playerclips to avoid all sorts of fueljumps
// arni - 09.07.2006 - Added spawnpt 3 - depot, truck, 3 positions
in it to
Mummy
send lawyers, guns and money
Due to other lua scripts i noticed that its possible to do such command, yes? Could be this available only for refs or rcons? So i will be able to add such command in etadmin format so only specific level got such option...
If any1 could help ill be appreciated
regards
Luke
/edited:
it should be some wait command before annoucing killer's hp because its overwritten by for example: you killed blabla
If any1 could help ill be appreciated
regards
Luke
/edited:
it should be some wait command before annoucing killer's hp because its overwritten by for example: you killed blabla
wolFTeam.pl
Was chatting with Luk4ward today and he asked if the announcehp could be made into a command called via admin_mod rather than announced each time. Here ya go Luk4, probably full of bugs but just let me know and I'll iron them out.
am_announcehp.lua
am_announcehp.lua
GhosT:McSteve
Ghostworks Gaming Community
Ghostworks Gaming Community
maybe this? As i said im not in lua atm..
i know this is the easiest way...if u got better then pls share it ;p
Code: Select all
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")
end
if (killerhp > 0) then
et.trap_SendServerCommand(victimnum, string.format("cp \"^7Your ^7killer ^7%s ^7has ^7still ^o%d ^7health ^7points ^7remaining.\n\"", killername, killerhp))
else
et.trap_SendServerCommand(victimnum, string.format("cp \"^7Your ^7killer ^7%s ^7has ^7no ^7points ^7remaining.\n\"", killername))
end
end
wolFTeam.pl