Jump to content

[Release] Fixed Kill/Death Messages


Guest

Recommended Posts

It's defined in variables.sqf  within my mission.  I'll try init.sqf.  Defining the others as false did fix the error.  Everyone just dies of natural causes now.

 

 

21:54:57 "Accidental Death: Jhhassen died of natural causes!"
21:54:58 "PVP Attack: B 1-1-F:1 (Jhhassen) REMOTE was hit by B 1-2-B:1 (dawson) REMOTE with FN_FAL from 51.7323m with 1.40945 dmg"
21:54:59 "Player is Null FAILED: Exiting, player sync: <NULL-object>"
21:54:59 Server: Object info 23:11 not found.
21:54:59 "PVP Attack: B 1-1-F:1 (Jhhassen) REMOTE was hit by B 1-2-B:1 (dawson) REMOTE with FN_FAL from 40.4258m with 1.40696 dmg"
Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Make sure have this in your Init.sqf

enableRadio true;
and

DZE_DeathMsgGlobal = true;
DZE_DeathMsgSide = true;
DZE_DeathMsgTitleText = true;

Alright I have done this and messages are working now. But players now involuntary broadcast the weather in side chat!! Very weird!

Link to comment
Share on other sites

Alright I have done this and messages are working now. But players now involuntary broadcast the weather in side chat!! Very weird!

 

Then you might just wanna use

DZE_DeathMsgTitleText = true;

and

DZE_DeathMsgGlobal = false;
DZE_DeathMsgSide = false;

and

enableRadio false;
Link to comment
Share on other sites

Try this

 

if (!isDedicated) then {
	player_build = compile preprocessFileLineNumbers "custom\snap_pro\player_build.sqf";
	snap_build = compile preprocessFileLineNumbers "custom\snap_pro\snap_build.sqf";
	dayz_spaceInterrupt = compile preprocessFileLineNumbers "custom\snap_pro\dayz_spaceInterrupt.sqf";
	call compile preprocessFileLineNumbers "custom\player_murderMenu.sqf";
};

 

Cheers it is working now, thanks :)

Link to comment
Share on other sites

Defined in init.sqf instead of variables if that makes a difference.

 

I made a var to do time - lasthit and added it to the logging so I can see what that number is when it doesn't work properly.

 

I am curious as to what that number is when I get PVP logs of bullet hits but it being of natural causes.... may not even be useful if somehow defining those variables in init.sqf instead of variables.sqf causes my issue.

Link to comment
Share on other sites

I'm not sure.  I would think so but I died in 10-15 seconds and that number was .30

 

Line 1067:  6:56:52 "PVP Event: YolkiPalki was killed by Boro {B.N.A} with weapon FN_FAL from 4.00375m (0.636963)"
Line 1088:  6:57:53 "PVP Event: xMakkaraa was killed by Adramelech with weapon M4A3_CCO_EP1 from 99.4654m (1.54004)"
Line 1129:  7:00:25 "PVP Event: Ivan was killed by Christopher Sissman with weapon m8_carbine from 166.796m (0.072998)"
Line 1704:  7:17:37 "PVP Event: Aati was killed by hyzint with weapon M24_des_EP1 from 454.898m (12.376)"
Line 1869:  7:23:25 "PVP Event: Zelioa was killed by George Smith with weapon M240_DZ from 4.80778m (3.29907)"
Line 2094:  7:34:40 "PVP Event: Ivan was killed by hyzint with weapon huntingrifle from 397.262m (19.302)"
 
Line 1055:  6:56:21 "Accidental Death: Zelioa died of natural causes! (1475.98)"
Line 1141:  7:00:36 "Accidental Death: hyzint died of natural causes! (1731.06)"
Line 1166:  7:01:35 "Accidental Death: hyzint died of natural causes! (1789.99)"
Line 1238:  7:02:27 "Accidental Death: hyzint died of natural causes! (1841.14)"
Line 1277:  7:03:11 "Accidental Death: sheep died of natural causes! (1885.83)"
Line 1283:  7:03:33 "Accidental Death: hyzint died of natural causes! (1907.62)"
Line 1310:  7:04:37 "Accidental Death: Zelioa died of natural causes! (1971.59)"
Line 1516:  7:08:23 "Accidental Death: Zelioa died of natural causes! (73.4089)"
Line 1647:  7:15:53 "Accidental Death: Ivan died of natural causes! (125.411)"
Line 1649:  7:16:00 "Accidental Death: Ben died of natural causes! (2654.17)"
Line 1670:  7:16:26 "Accidental Death: ihazcrayonz died of natural causes! (2679.95)"
Line 1754:  7:20:42 "Accidental Death: hyzint died of natural causes! (2936.72)"
Line 1779:  7:21:46 "Accidental Death: hyzint died of natural causes! (3000.04)"
Line 1872:  7:23:26 "Accidental Death: hyzint died of natural causes! (3100.59)"
Line 2067:  7:33:16 "Accidental Death: he-man died of natural causes! (2495.99)"
Line 2155:  7:37:04 "Accidental Death: Zelioa died of natural causes! (3917.83)"
Line 2235:  7:39:58 "Accidental Death: Zelioa died of natural causes! (36.377)"

 

Not all of those but a good bit were PVP kills.  I'm not 100% sure the math is working on the logging but I'm checking... but it appears _lastHit is not getting subtracted from time although a few of them do seem that way.

Link to comment
Share on other sites

We fixed most of those issues by setting a 2 second delay timer at the start e.g.

 

private ["_characterID","_minutes","_playerID","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_randmsg","_loc_message","_key","_death_record];

_characterID     = _this select 0;
_minutes         = _this select 1;
_victim         = _this select 2;
_playerID         = _this select 3;
_infected         = _this select 4;

_victimName        = name _victim;
_victimGroup    = group _victim;

deleteGroup _victimGroup;

_victim setVariable ["bodyName",_victimName,true];

sleep 2;

_killer     = _victim getVariable["AttackedBy","nil"];
_killerName = _victim getVariable["AttackedByName","unknown"];

if ((typeName _killer) == "OBJECT") then {
    _weapon     = _victim getVariable["AttackedByWeapon","unknown"];
    _distance     = _victim getVariable["AttackedFromDistance","unknown"];

    if ((owner _victim) == (owner _killer)) then  {
        _randmsg = [
            "did not see the point in life any more",
            "thought it was best to end his life",
            "figured his life was worthless",
            "killed himself",
            "should have read a book on physics"
        ] call BIS_fnc_selectRandom;
        _message         = format["[DEATH] %1 %2",_victimName, _randmsg];
        _loc_message     = format["PDEATH: %1 (%2) killed himself", _victimName,_playerID];
    } else {
    
        if(isPlayer _killer) then {
            _killerName = format["[Human] %1", _killerName];
        } else {
            _killerName = format["[AI] %1", _killerName];
        };
    
        _message         = format["[KILL] %1 was killed with a %2 from about %3m",_victimName,_weapon,round(_distance)];
        _loc_message     = format["PDEATH: %1 (%5) was killed by %2 with a %3 from %4m",_victimName,_killerName,_weapon,_distance,_playerID];
        _death_record     = [_victimName,_killerName,_weapon,_distance,ServerCurrentTime];
        
        PlayerDeaths set [count PlayerDeaths,_death_record];
    };
    
} else {

    _randmsg = [
        "got eaten by zombies, lal noob",
        "was trolled by a zombie xD",
        "became breakfast for a zed",
        "met Chuck Norris as a zombie",
        "tried to tame a zombie"
    ] call BIS_fnc_selectRandom;
    _message         = format["[BREAKFAST] %1 %2",_victimName,_randmsg];
    _loc_message     = format["PDEATH: %1 (%2) got killed by a zombie",_victimName,_playerID];
    
};

RemoteMessage = ["global",_message];
publicVariable "RemoteMessage";

diag_log _loc_message;

RemoteMessage = nil;

_victim setVariable["processedDeath",diag_tickTime];

if (typeName _minutes == "STRING") then {
    _minutes = parseNumber _minutes;
};

if (_characterID != "0") then {
    _key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
    #ifdef DZE_SERVER_DEBUG_HIVE
    diag_log ("HIVE: WRITE: "+ str(_key));
    #endif
    _key call server_hiveWrite;
} else {
    deleteVehicle _victim;
};

Link to comment
Share on other sites

  • 2 weeks later...

Server lag will do that, either sleep 2 wont be enough or it slowly turns into sleep ∞

Still working on this. Actually haven't been working on it lol. With BE allowing RE's to come in we've had our hands full with script kiddies for a bit. People are happy they are working better than before. sleep 2 definitely helped I think overall it just needs a bit more attention to have it working close to perfect.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hi

I have implemented this on my server, and it is work much better then it use to however I have these 2 problem - Anyone know how to fix this ?

 

Problem 1:

We get a lot broadcasts saying ‘Died of natural causes’ I think mainly when players die to one shot kills.

 

"Accidental Death: X died of natural causes!"
"PVP Attack: B 1-1-F:1 (X) REMOTE was hit by B 1-1-C:1 (Y) REMOTE with Winchester1866 from 24.7815m with 1.4604 dmg"

 

Problem 2:

This I written in the RPT log to – I think is when you get killed by an armored car / chopper

 

"PVP Attack: B 1-3-A:1 (X) REMOTE was hit by <NULL-object> with Unknown from 1e+010m with 6.24675 dmg"

 

Anyone have a suggestion on how to fix this ?

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...