Author Topic: Client Damage Detection  (Read 2836 times)

I'm looking for several methods of detecting the following this:
  • When you kill/destroy an object (player/vehicle/bot)
  • When you damage an object
  • When you get killed

For the deaths, blockland sends that info thru another clientcmd that I don't know the name of.

For damage, I'm not sure.

commandToClient(%cl,'ServerMessage','MsgYourDeath',"");
this is how you send the death message to the client, to do it client sided you could probably package servermessage and check if its "msgyourdeath'

damage is a bit trickier, the only way i could think of doing it would be to check for damage flash, which could be affected by other mods

the only way you can detect if you kill a player is if it's sent in a chat message, otherwise I don't think there is another way to detect killing of other things


I'm pretty sure that your health is sent to the client, thats how the health bar GUI works, not sure if its only sent if you have a health bar or not, but you could just check every 100ms or so to see if its changed.

I'm pretty sure that your health is sent to the client, thats how the health bar GUI works, not sure if its only sent if you have a health bar or not, but you could just check every 100ms or so to see if its changed.
It's only sent to you if the server has the health bar add on enabled.

It's only sent to you if the server has the health bar add on enabled.

False, according to computermix damage levels for every player in the server is sent to you.

Even his hack let's you see other's health.
« Last Edit: July 22, 2013, 09:00:32 PM by Wrapperup »

False, according to computermix damage levels for every player in the server is sent to you.

Even his hack let's you see other's health.
Unless you want to use Computermix's hacky method or make a server sided mod too, then no, it's not sent to you (to my knowledge).

Unless you want to use Computermix's hacky method or make a server sided mod too, then no, it's not sent to you (to my knowledge).

You can do it without hacking, when you are damaged, notice how it makes it red?
It gets redder when more damage occurs, so you can use this to create a client healthbar.
« Last Edit: July 22, 2013, 10:12:11 PM by Wrapperup »

You can do it without hacking, when you are damaged, notice how it makes it red?
It gets redder when more damage occurs, so you can use this to create a client healthcare.
But you won't be able to determine the exact amount of health you have left.

I'm looking to see when I damage Other players

When you kill/destroy an object (player/vehicle/bot)
When you damage an object

I don't care if I get damaged, I want to know when and how much damage I do to other players

You can do it without hacking, when you are damaged, notice how it makes it red?
It gets redder when more damage occurs, so you can use this to create a client healthbar.
I'm like 90% sure that the server only sends damage flash values to you rather than your health

I'm looking to see when I damage Other players

I don't care if I get damaged, I want to know when and how much damage I do to other players

You can't.


can't I just detect when pain emotes are added?

bbs

the only way you can detect if you kill a player is if it's sent in a chat message, otherwise I don't think there is another way to detect killing of other things


if you really want to do this the easy way, do this
Code: [Select]
for(%a = 0; %a < ClientGroup.getCount(); %a++) // count of clients
{
%Subclient = clientgroup.getobject(%a);
}
 
add this to a function and this is pretty much what your looking for