Jump to content
  • 0

Kill Message


DavemanDingo

Question

I am helping run a non PvP server and it would help to have a kill message when someone gets killed by a player or even AI/zombies. I have seen them on other servers, where it says who shot who, with what, & the distance. I'm not having any luck finding any help on the web.

 

Thanks in advance!

Link to comment
Share on other sites

Recommended Posts

  • 0

 

I am running 1.0.4.2 and I got this to work by modifying the following:

 

//Customize Death Messages
//Enables global chat messaging of player deaths. (Also requires enableRadio true;?)   (Default: false)
DZE_DeathMsgGlobal = true;
 
//Enables side chat messaging of player deaths. (Also requires enableRadio true;?)   (Default: false)
DZE_DeathMsgSide = true;
 
//Enables global title text messaging of player deaths.  (Default: false)
DZE_DeathMsgTitleText = true;
 
and I also set the following:
enableRadio true;
enableSentences true;
 
Note: We tested this 5 times in a row and certian players got different messages. I got just the message in side chat where others had both side chat and global. Some didnt get one at all. Wierd. Hope this helps!

 

These don't appear in my init.sqf.. do I need to add them? (referring to DZE_DeathMsgTitleText = )

Link to comment
Share on other sites

  • 0

Just add them to your init.sqf. Have found that not all work, some messages are local to the player only. The best way is to get the server to broadcast messages, even then not all were straight forward. Got it working on a mission script I had started, has been a while, will take a look and see how I got it working..

Link to comment
Share on other sites

  • 0

I have this working on a regular dayz server, but Im not sure if the same method would work for epoch?

 

I followed these instructions

http://dayz.st/w/Kill_Messages

 

Except when it came time to add the server_playerDied.sqf I used this script instead of the one provided in the link

#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
 
private["_characterID","_minutes","_newObject","_playerID","_key","_playerName","_playerID","_myGroup","_group","_victim", "_killer", "_weapon", "_message",                          "_distance","_loc_message","_victimName","_killerName","_killerPlayerID"];
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
_characterID =     _this select 0;
_minutes =        _this select 1;
_newObject =     _this select 2;
_playerID =     _this select 3;
_playerName =     name _newObject;
 
_victim removeAllEventHandlers "MPHit";
 
_victim = _this select 2;
_victimName = _playerName;
 
_killer = _victim getVariable["AttackedBy", "nil"];
_killerName = _victim getVariable["AttackedByName", "nil"];
 
// when a zombie kills a player _killer, _killerName and _weapon will be "nil"
// we can use this to determine a zombie kill and send a customized message for that. right now no killmsg means it was a zombie.
if (_killerName != "nil") then
{
    _weapon = _victim getVariable["AttackedByWeapon", "nil"];
    _distance = _victim getVariable["AttackedFromDistance", "nil"];
 
    if (_victimName == _killerName) then
    {
         _message = format["%1 killed himself",_victimName];
         _loc_message = format["PKILL: %1 killed himself", _victimName];
    }
    else
    {
        _killerPlayerID = getPlayerUID _killer;
         _message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
         _loc_message = format["PKILL: %1 (%5) was killed by %2 (%6) with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance, _playerID,         _killerPlayerID];
    };
 
    diag_log _loc_message;
    [nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
 
    // Cleanup
    _victim setVariable["AttackedBy", "nil", true];
    _victim setVariable["AttackedByName", "nil", true];
    _victim setVariable["AttackedByWeapon", "nil", true];
    _victim setVariable["AttackedFromDistance", "nil", true];
};
 
//dayz_disco = dayz_disco - [_playerID];
_newObject setVariable["processedDeath",time];
_newObject setVariable ["bodyName", _playerName, true];
 
/*
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
if (isnil "_characterID") then {
diag_log ("DW_DEBUG: _newObject: " + str(_newObject));   
    };
*/
 
if (typeName _minutes == "STRING") then
{
    _minutes = parseNumber _minutes;
};
 
if (_characterID != "0") then
{
    _key = format["CHILD:202:%1:%2:",_characterID,_minutes];
    //diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
}
else
{
    deleteVehicle _newObject;
};
 
#ifdef PLAYER_DEBUG
format ["Player UID#%3 CID#%4 %1 as %5 died at %2",
    _newObject call fa_plr2str, (getPosATL _newObject) call fa_coor2str,
    getPlayerUID _newObject,_characterID,
    typeOf _newObject
];
#endif
 
/*
_eh = [_newObject] spawn {
    _body = _this select 0;
    _method = _body getVariable["deathType","unknown"];
    _name = _body getVariable["bodyName","unknown"];
    waitUntil{!isPlayer _body;sleep 1};
    _body setVariable["deathType",_method,true];
    _body setVariable["bodyName",_name,true];
    diag_log ("PDEATH: Player Left Body " + _name);
};
*/
//dead_bodyCleanup set [count dead_bodyCleanup,_newObject];
 
sleep 600;
deleteVehicle _newObject;
Link to comment
Share on other sites

  • 0

In what file would this be logged? Or is the actual file called PKILL

 

EDIT:

 

Never mind. It's logged in the ARMA2OASERVER.RPT.

 

How difficult would it be to write these values to a custom table in the mysql database?

 

Can't fint the PKILL on .RPT loggs. Just can find the PDeath with is just sayin Player "PlayerID" Died.

 

Can somebody tell me how to figure out how to find the Killmessages in the log file?

 

 

Would be nice,

 

Greetings

Link to comment
Share on other sites

  • 0

Here the original post from E.T Michael

 

http://epochmod.com/forum/index.php?/topic/10870-release-death-messages-working-on-epoch-1042-still-working-on-character-selection/

 

you need to enable this in the init.sqf


//disable radio messages to be heard and shown in the left lower corner of the screen

enableRadio true;

DZE_DeathMsgGlobal = true;

DZE_DeathMsgTitleText = true;

here are the links for the server files

fnc_plyrHit.sqf
server_playerDied.sqf
server_playerSetup.sqf

 

 

I did not tested it!

Link to comment
Share on other sites

  • 0

Using Epoch 1.0.5.1 arma 112555

 

I have no killmessages shown up yet, because it`s new clean serverinstallation. Ingame it shows only player was killed. That`s ok, but if i look in .rpt , i see "XXX killed himself". Whatever Player got killed by another player.

How can i fix it?

Link to comment
Share on other sites

  • 0

Using Epoch 1.0.5.1 arma 112555

 

I have no killmessages shown up yet, because it`s new clean serverinstallation. Ingame it shows only player was killed. That`s ok, but if i look in .rpt , i see "XXX killed himself". Whatever Player got killed by another player.

How can i fix it?

 

Link to comment
Share on other sites

  • 0
On ‎7‎/‎12‎/‎2013 at 10:24 PM, vbawol said:

by default there is a death message logged server side look for "PKILL:".

Hey Vbawol,

 

How about when kill messages fire on server restart, only once per character?

I am using ESS V2, and have tested the following methods and can  reproduce every time. .. I hae tried so many things to fix this, but always the same result "XXX Died of natural causes"

I know this is realted to ESS V2 however, I was hoping you might be able to shed some light on this, since no other post I have searched has a fix.

 

1) Server restarts - Any player that was alive at last restart will show full death message, i.e. XXX was killed by XXX from XXX with XXX.

2) Player joins server and must choose class - No kill message. If the server restarts and no change of class is needed (he's still alive) See 1

3) Player changes clothes regardless of life status after a fresh server - "XXX died of natural causes"

Thanks if you are able or not to help, for everything you have done.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...