HELP!! Players respawning geared at their body. Kill messages occasionally not working...

DangerRuss

OpenDayZ Rockstar!
Im running a fairly popular overwatch server, and very recently, as in within the past couple of days, players who die occasionally respawn at or near their body fully geared. Also, my custom kill messages don't seem to be working when this happens. I can't find any real help on this and its driving people away from the server.
Im wondering if it's possibly the custom server_playerdied.sqf I have? Also, Im not very good with the database and Im sure I have tons and tons of instances from dead players. Im sure every player probably has 30+ entries in the survivor table.... Any help would be HUGE. This is making me rip my hair out.
 
lets see what we can do.
First pastebin your playerdied.sqf.
Second do you have any querries to delete dead players?
If not try using this one (In case you have a Character_Data Table in your DB):

Deleting Characters of players which didnt logged in 30 days ago
Code:
DELETE FROM Character_DATA WHERE LastLogin < NOW() - INTERVAL 30 DAY;

Maybe just for cleaning up the whole thing use this:
Delete every dead character but not the last one of a players so he maybe keep his humanity.
Code:
delete FROM character_data

USING character_data, character_data AS tmpcharacter_data

WHERE NOT character_data.CharacterID=tmpcharacter_data.CharacterID

AND character_data.CharacterID<tmpcharacter_data.CharacterID
AND (character_data.PlayerUID=tmpcharacter_data.PlayerUID);
 
Oh I should mention for the record Im running reality hive not bliss. I have an SQL to run to clean up old instances of dead players but im not sure if I can run it when the server is running?
Code:
DELETE FROM survivor
WHERE is_dead = 1;
No character_DATA table in my database.
I have profile, survivor, v_player... I can list every single table under overwatch if you'd like.

As for the kill messages. I followed this tutorial http://dayz.st/w/Kill_Messages
but I used this customized server_playerdied.sqf
Code:
#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;

I do have errors in my RPT but I can't be sure which ones are just in there from overwatch normally and which ones are caused by me. One error stands out in my mind though...
Code:
15:58:04 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-4-E:1 (Gallaxy) REMOTE,"aimpoint",12.3611]"
15:58:04 "Time and date: [2013,8,3,11,0]"
15:58:04 WARNING: Function 'name' - Gallaxy is dead
15:58:04 Error in expression <ect 3;
_playerName =     name _newObject;

_victim removeAllEventHandlers "MPHit";
>
15:58:04   Error position: <_victim removeAllEventHandlers "MPHit";
>
15:58:04   Error Undefined variable in expression: _victim
15:58:04 File z\addons\dayz_server\compile\server_playerDied.sqf, line 11
Although I've always had that error since running Overwatch and I was told by someone else that this is a 112555 issue. The thing is, the custom kill messages used to work every time without fail. It's only in the last few days that this problem arose, and I haven't added any custom scripts any time recently.
 
weird.
Have you tried using a vanilla server_playerDied.sqf?

Just for comparing
This is how Epochs server_playerDied.sqf:
Code:
private ["_characterID","_minutes","_newObject","_playerID","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_death_record"];
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
_characterID =     _this select 0;
_minutes =        _this select 1;
_newObject =     _this select 2;
_playerID =     _this select 3;
_infected =        _this select 4;
_victimName =     name _newObject;

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

_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
    {
        _message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
        _loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
    };

    diag_log _loc_message;
   
    if(DZE_DeathMsgGlobal) then {
        [nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
    };
    /* needs customRemoteMessage
    if(DZE_DeathMsgGlobal) then {
        customRemoteMessage = ['globalChat', _message, _killer];
        publicVariable "customRemoteMessage";
    };
    */
    if(DZE_DeathMsgSide) then {
        [nil, nil, rspawn, [_killer, _message], { (_this select 0) sideChat (_this select 1) }] call RE;
    };
    if(DZE_DeathMsgTitleText) then {
        [nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
    };

    // build array to store death messages to allow viewing at message board in trader citys.
    _death_record = [
        _victimName,
        _killerName,
        _weapon,
        _distance,
        ServerCurrentTime
    ];
    PlayerDeaths set [count PlayerDeaths,_death_record];

    // Cleanup
    _victim setVariable["AttackedBy", "nil", true];
    _victim setVariable["AttackedByName", "nil", true];
    _victim setVariable["AttackedByWeapon", "nil", true];
    _victim setVariable["AttackedFromDistance", "nil", true];
};

// Might not be the best way...
/*
if (isnil "dayz_disco") then {
    dayz_disco = [];
};
*/

// dayz_disco = dayz_disco - [_playerID];
_newObject setVariable["processedDeath",diag_tickTime];

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

diag_log ("PDEATH: Player Died " + _playerID);

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 _newObject;
};
 
This was the kill message script I used on my server when I ran vanilla.

Im guessing that epoch script wouldn't work considering it's calling for an array for the deathboards.
 
So Im trying to use this query
Code:
DELETE FROM survivor
WHERE is_dead = 1;
but its yelling at me because it doesn't want to delete anybody who has an instance deployable tied to the ID. The instance deployable ID is referencing the survivor ID. How can I adjust this query so that it deletes them anyway?
 
You must have an Error in your RPT when a player dies.
I had once the same issue can't remember how i fixed it though. but there was a Log which helped alot
 
isn't it the one I pasted above? or there is something else? there are several errors but Im having difficulty determining which are just because of the new arma beta reporting all of the undefined variables in overwatch.
 
If it is then there is something wrong with the variable "_vitctim"
I recommend to use a vanilla server_playerdied.sqf and test the advanced kill messages on a test server till it's working ;)
 
This is a kill when the kill message displays properly.
Code:
15:30:45 "P1ayer PID#35(nyasha94) hit by PID#22(CrazyHorse) with FHQ_ACR_WDL_TWS_SD_F/FHQ_rem_680x43_BallNT_SD <ammo left:2> from 18 meters"
15:30:45 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-3-L:1 (nyasha94) REMOTE,"lelbow",1.2219]"
15:30:45 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-3-L:1 (nyasha94) REMOTE,"pilot",0.894463]"
15:30:45 WARNING: Function 'name' - nyasha94 is dead
15:30:45 "PHIT: B 1-3-L:1 (nyasha94) REMOTE (9019972) was hit by B 1-3-G:1 (CrazyHorse) REMOTE (117105030) with FHQ_ACR_WDL_TWS_SD_F from 17.4429m"
15:30:45 WARNING: Function 'name' - nyasha94 is dead
15:30:45 "PKILL: nyasha94 (9019972) was killed by CrazyHorse (117105030) with weapon FHQ_ACR_WDL_TWS_SD_F from 17.4429m"
15:30:45 Error in expression <ect 3;
_playerName =     name _newObject;

_victim removeAllEventHandlers "MPHit";
>
15:30:45   Error position: <_victim removeAllEventHandlers "MPHit";
>
15:30:45   Error Undefined variable in expression: _victim
15:30:45 File z\addons\dayz_server\compile\server_playerDied.sqf, line 11

and I believe this is an example of the kill message not working
Code:
15:28:51 "P1ayer PID#4(Shaggy) hit by PID#18(Gyilkozaytsev) with RH_hk417sdaim/RH_B_762x51_SD_hk417 <ammo left:12> from 246 meters"
15:28:51 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-1-K:1 (Shaggy) REMOTE,"neck",3.28511]"
15:28:51 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-1-K:1 (Shaggy) REMOTE,"lelbow",2.60218]"
15:28:51 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-1-K:1 (Shaggy) REMOTE,"aimpoint",2.45602]"
15:28:51 Error in expression <ictimName];
}
else
{
_killerPlayerID = getPlayerUID _killer;
_message = format[>
15:28:51   Error position: <getPlayerUID _killer;
_message = format[>
15:28:51   Error getplayeruid: Type String, expected Object
15:28:51 File z\addons\dayz_server\compile\server_playerDied.sqf, line 33
15:28:51 Error in expression <ect 3;
_playerName =     name _newObject;

_victim removeAllEventHandlers "MPHit";
>
15:28:51   Error position: <_victim removeAllEventHandlers "MPHit";
>
15:28:51   Error Undefined variable in expression: _victim
15:28:51 File z\addons\dayz_server\compile\server_playerDied.sqf, line 11
15:28:51 "z\addons\dayz_code\medical\setup_functions_med.sqf::fnc_usec_damageBleed [B 1-1-K:1 (Shaggy) REMOTE,"LeftFoot",0.52131]"

does anything stand out to you?

I don't have a test server. I rent my server from vilayer on a monthly basis.
 
Hard to tell.
I have a dedicated Machine. If you don't mind sending me over your mission and server files I will try to setup a overwatch server and see what I can do :)
 
Back
Top