banimod / etpro / ettv forums Forum Index banimod / etpro / ettv forums
Bani's Discussion Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

announce players hp left
Goto page 1, 2  Next
 
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding
View previous topic :: View next topic  
Author Message
cwG`Mummy



Joined: 12 Aug 2005
Posts: 15

PostPosted: Wed Aug 16, 2006 6:43 am    Post subject: announce players hp left Reply with quote

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 Smile

// 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 Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ReyalP



Joined: 25 Jul 2003
Posts: 1663

PostPosted: Wed Aug 16, 2006 2:04 pm    Post subject: Re: announce players hp left Reply with quote

*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

You could proably do this with a lua mod

Quote:

And is there any map scripts that dont let players blow up the objectiv
so i can have on my frag server ?

This should be very easy to do yourself.

Quote:

And i was woundering if anyone can tell we what to change in fueldump.script so this change can be in my server

There are a lot of fueldump scripts, it's not clear which one you are talking about.
_________________
send lawyers, guns and money
Back to top
View user's profile Send private message
cwG`Mummy



Joined: 12 Aug 2005
Posts: 15

PostPosted: Thu Aug 17, 2006 3:09 am    Post subject: Re: announce players hp left Reply with quote

ReyalP wrote:
*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

You could proably do this with a lua mod

Quote:

And is there any map scripts that dont let players blow up the objectiv
so i can have on my frag server ?

This should be very easy to do yourself.

Quote:

And i was woundering if anyone can tell we what to change in fueldump.script so this change can be in my server

There are a lot of fueldump scripts, it's not clear which one you are talking about.
Im talking about that i have this in my fueldump script today

// ============================================================================
// 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 Smile 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 Smile


Mummy
_________________
83.243.82.119:27960 cwG`House Of Frags
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Phenomenon



Joined: 05 Jul 2006
Posts: 5

PostPosted: Thu Aug 17, 2006 8:29 am    Post subject: Re: announce players hp left Reply with quote

*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

- save following code as announcekillershealth.lua to ur etpro folder

Code:
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

- add set lua_modules "announcekillershealth.lua" to your server configuration
- restart your server

to display some other text to the victim feel free to edit line 9 ...

have phun
Back to top
View user's profile Send private message
cwG`Mummy



Joined: 12 Aug 2005
Posts: 15

PostPosted: Thu Aug 17, 2006 10:05 am    Post subject: Re: announce players hp left Reply with quote

Phenomenon wrote:
*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

- save following code as announcekillershealth.lua to ur etpro folder

Code:
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

- add set lua_modules "announcekillershealth.lua" to your server configuration
- restart your server

to display some other text to the victim feel free to edit line 9 ...

have phun
Tanks alot for this and it works but then my killingspree sounds stops working Sad

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
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Phenomenon



Joined: 05 Jul 2006
Posts: 5

PostPosted: Thu Aug 17, 2006 10:46 am    Post subject: Reply with quote

simply add

Code:
set lua_modules "playsound.lua announcekillershealth.lua"

to your config
Back to top
View user's profile Send private message
cwG`Mummy



Joined: 12 Aug 2005
Posts: 15

PostPosted: Thu Aug 17, 2006 11:29 am    Post subject: Reply with quote

Phenomenon wrote:
simply add

Code:
set lua_modules "playsound.lua announcekillershealth.lua"

to your config
Tanks alot for this and it works:)
_________________
83.243.82.119:27960 cwG`House Of Frags
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ReyalP



Joined: 25 Jul 2003
Posts: 1663

PostPosted: Thu Aug 17, 2006 5:11 pm    Post subject: Re: announce players hp left Reply with quote

*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 Smile 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 Smile


Mummy

So find the relavent bits of mapscript code (using some kind of diff/merge tool) and merge them.
_________________
send lawyers, guns and money
Back to top
View user's profile Send private message
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Wed Dec 27, 2006 4:55 pm    Post subject: Reply with quote

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
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 112

PostPosted: Fri Dec 29, 2006 8:43 am    Post subject: Reply with quote

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
_________________
GhosT:McSteve
Ghostworks Gaming Community
Back to top
View user's profile Send private message
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Sun Dec 31, 2006 2:57 am    Post subject: Reply with quote

thanks McSteve going soon to use it,

btw McSteve fixed bug with minus hp.

regards

and thanks again for your help McSteve Smile
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 112

PostPosted: Sun Dec 31, 2006 8:40 am    Post subject: Reply with quote

Cool, can you post it and share?
_________________
GhosT:McSteve
Ghostworks Gaming Community
Back to top
View user's profile Send private message
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Sun Dec 31, 2006 12:26 pm    Post subject: Reply with quote

Luk4ward wrote:
thanks McSteve going soon to use it,

btw McSteve fixed bug with minus hp.

regards

and thanks again for your help McSteve Smile


McSteve wrote:

Cool, can you post it and share?


I said that u have fixed this bug with minus hp Very Happy, u know that im not in lua language atm...
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Tue Jan 02, 2007 1:03 am    Post subject: Reply with quote

maybe this? As i said im not in lua atm..

Code:

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


i know this is the easiest way...if u got better then pls share it ;p
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 112

PostPosted: Tue Jan 02, 2007 11:20 am    Post subject: Reply with quote

That looks like it'll do the trick. I think I'm going to add it to my server and so I should find any other bugs fairly quickly.
_________________
GhosT:McSteve
Ghostworks Gaming Community
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group