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 Previous  1, 2
 
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding
View previous topic :: View next topic  
Author Message
nedd3h



Joined: 14 Jan 2005
Posts: 67
Location: Australia

PostPosted: Wed Jan 03, 2007 1:51 am    Post subject: Reply with quote

i've been keeping an eye on this thread Smile
looking forward to see what comes out after testing
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 112

PostPosted: Wed Jan 03, 2007 6:24 am    Post subject: Reply with quote

The script that Phenomenon posted works fine, and the one that I posted works with the admin_mod although it hasn't been tested for bugs (Luk4 spotted that negative values were being displayed sometimes, this is because your killer's health is captured at the time of the victim's death, so if your killer dies before you, negative health is shown).

I will be tidying it up shortly and so if you have any suggestions n3dd3h, plz post away.

Smile
_________________
GhosT:McSteve
Ghostworks Gaming Community
Back to top
View user's profile Send private message
nedd3h



Joined: 14 Jan 2005
Posts: 67
Location: Australia

PostPosted: Wed Jan 03, 2007 2:06 pm    Post subject: Reply with quote

McSteve wrote:
I will be tidying it up shortly and so if you have any suggestions

just one question...


Luk4ward wrote:
it should be some wait command before annoucing killer's hp because its overwritten by for example: you killed blabla

does this still happen?
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 112

PostPosted: Wed Jan 03, 2007 2:21 pm    Post subject: Reply with quote

That happens fairly often with the version Phenomenon posted, because hp gets announced after every death by an enemy. With the version I posted, its a command called via admin_mod, so you dont ever see it unless you type !hp in chat/console. It is still shown as a "cp" message, but is less likely to be overwritten.

Commented out in the script I posted is the method to broadcast the message as a "qsay", which will appear in console and not be overwritten.
_________________
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: Wed Jan 03, 2007 2:59 pm    Post subject: Reply with quote

yep, need3h it isnt a bug Razz

For testing new versions I just havent got to do it...Thx again and again for your help McSteve Smile. Are You sure the value is ok but only with minus ? If so..then:

wrote:

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 ^7still ^o%d ^7health ^7points ^7remaining.\n\"", killername, -killerhp))


end
end


i checked in manual for abs like in pascal, cos the language looks similar...Can't find and instead of this i used `-´ (negation)

regards

any comments would be nice
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 112

PostPosted: Sat Jan 06, 2007 1:46 am    Post subject: Reply with quote

Negative hp values are returned when your killer dies before you do. Changing the sign to positive changes the hp figure from slightly meaningless to just plain wrong. I could change it so if hp <0 then it says something different like "Your killer died before you did" or something.
_________________
GhosT:McSteve
Ghostworks Gaming Community
Back to top
View user's profile Send private message
Clutch152



Joined: 12 Oct 2006
Posts: 33

PostPosted: Sat Jan 06, 2007 1:57 am    Post subject: Reply with quote

Well I hope you guys don't mind but I used this in my mod which is almost finished. I changed it so if you kill some one and another player comes around the corner and kills you while you have like 10 hp it wont display anything. A friend of mine got tired of feeling like he was just owned by some one with 100 hp when he just got done killing somone and had low health. I also had it display different messages for different amounts of HP and also display a message if the killer was using adrenaline. It also displays a different message if you kill some one and then you die by their grenade, panzer, or dyno. I'll gladly credit who ever though of this Very Happy

Luk4ward wrote:
i checked in manual for abs like in pascal, cos the language looks similar...Can't find and instead of this i used `-´ (negation)


I believe to get an absolute value you have to use math.abs(NUMER)

http://lua-users.org/wiki/MathLibraryTutorial
Back to top
View user's profile Send private message AIM Address
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Sun Jan 07, 2007 9:57 am    Post subject: Reply with quote

ok, thx for the link

btw Clutch152 r u going to share it with us?:> Im looking forward for such thing Razz

regards

p.s can i somehow replace the txt: you killed blabla ?
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
Clutch152



Joined: 12 Oct 2006
Posts: 33

PostPosted: Sun Jan 07, 2007 12:34 pm    Post subject: Reply with quote

Yes I am going to share it but it is running on my server and a friends server. If you wanna come check it out you can. My friends is still working on his server settings so I'll give you the IP to mine 70.42.41.161

I'm gonna announce it when I am done here.
Laughing Laughing Laughing Laughing Laughing
Back to top
View user's profile Send private message AIM Address
Singima



Joined: 17 Aug 2010
Posts: 6
Location: Bosnia and Herzegovina

PostPosted: Thu Sep 09, 2010 8:50 pm    Post subject: Reply with quote

how to do it like this so when u get killed a text shows like :

Killer: babyHD HP: 80
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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 Previous  1, 2
Page 2 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