100% Kill & Death Messages 1.7.7.1

Change:

[nil, nil, rTITLETEXT, _message, "PLAIN DOWN", 0] call RE;


To :

[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;



This will put it into the chat and allow players to scroll through the history by pressing "/" and the Page up adn Down.

The only way to get the _message to be seen in Gotcha or DaRT is if it is sent as a message by the client....ANYONE have any idea how to force the client to send a message???
 
Change:

[nil, nil, rTITLETEXT, _message, "PLAIN DOWN", 0] call RE;


To :

[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;



This will put it into the chat and allow players to scroll through the history by pressing "/" and the Page up adn Down.

The only way to get the _message to be seen in Gotcha or DaRT is if it is sent as a message by the client....ANYONE have any idea how to force the client to send a message???

Thx, for teh reply, the problem ist that this replacement doesnt work here...
 
Hello,

I have my server hosted at HFBservers, probably a reality server.

The problem is that my dayz_mission \ init.sqf does not contain this line:
Code:
enableRadio false;

Is it possible to add?
 
Change:

[nil, nil, rTITLETEXT, _message, "PLAIN DOWN", 0] call RE;


To :

[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;



This will put it into the chat and allow players to scroll through the history by pressing "/" and the Page up adn Down.

The only way to get the _message to be seen in Gotcha or DaRT is if it is sent as a message by the client....ANYONE have any idea how to force the client to send a message???

Thanks for the script but I made some changes to the line you added. ^^
(If you dont mind?)

Change:[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;

To:[nil, nil, rspawn, [_victim, _message], { (_this select 0) globalChat (_this select 1) }] call RE;

As this way it doesn't give the killers name away to the various players in the server and displays the victims name instead. ^.- Enjoyy.
 
I have followed the instructions and can't see anything that i've done wrong, however when i upload the mission and server pbos i get stuck on login (gets to George Smith - private). The one thing i struggled to find was the mpeventhandler. Can anyone tell me where this should be located?

Also, will this scripting be affected by the selfblood, admintools and autofuel scripts?
 
I have followed the instructions and can't see anything that i've done wrong, however when i upload the mission and server pbos i get stuck on login (gets to George Smith - private). The one thing i struggled to find was the mpeventhandler. Can anyone tell me where this should be located?

Also, will this scripting be affected by the selfblood, admintools and autofuel scripts?


Before you upload the files to your server, repack them into the .pbo files then open (Not extract) it and click the padlock and right click in the box, click remove, then right click again then click generate. Then apply. Re-Pack. Re-upload to server.
Ta-Da. ^.-

And no, it shouldn't. If it does, you've done something wrong. :p
 
this is what I have done for my server:
_________________________________________________________________

Open dayz_server/init/server_functions.sqf

find:

server_updateNearbyObjects =compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";

Add below that line the following new line:

fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";

_________________________________________________________________

Open dayz_server/compile/server_playerDied.sqf

find:

private ["_characterID","_minutes","_newObject","_playerID","_key"];
//[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;

//dayz_disco = dayz_disco - [_playerID];

replace with:

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, rTITLETEXT, _message, "PLAIN DOWN", 0] 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];

_________________________________________________________________

Open dayz_server/compile/server_playerSetup.sqf

find:

if (isNull _playerObj) exitWith {
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
};

if (_playerID == "") then {
_playerID = getPlayerUID _playerObj;
};

replace with:

if (isNull _playerObj) exitWith {
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
};

//Add MPHit event handler
diag_log("Adding MPHit EH for " + str(_playerObj));
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];

if (_playerID == "") then {
_playerID = getPlayerUID _playerObj;
};

_________________________________________________________________

Optional

Open dayz_server/compile/server_playerDied.sqf and edit the line
_message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];

Example if you want to only show that a player was killed with a weapon instread of WHO killed them.
_message = format["%1 was killed with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];

_________________________________________________________________

Battle Eye Filters (Unsure if this works)

Open BattlEye/mpeventhandler.txt
find following lines:

5 "spawn" !="spawn BIS_Effects_AirDestruction" !="spawn BIS_Effects_AirDestructionStage2" !="spawn BIS_Effects_Burn"
5 "this" !="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';" !="_v setVehicleInit format [\"[this, %1, %2,false,true]spawn BIS_Effects_Burn\",_int, _t];" !="_v setVehicleInit \"[this] spawn BIS_Effects_AirDestruction\";" !="if((local(_this select 0))or(isServer))then{_this call fnc_plyrHit_local;};" !="if(local(_this select 0))then{_this call fnc_plyrDead_local;};"

replace with:

1 "spawn" !="spawn BIS_Effects_AirDestruction" !="spawn BIS_Effects_AirDestructionStage2" !="spawn BIS_Effects_Burn" !="spawn fnc_plyrHit" !"fnc_plyrHit.sqf" !"server_playerSetup.sqf" !"server_playerDied.sqf"
1 "this" !="this enableSimulation false;this allowDammage false;this disableAI 'FSM';this disableAI 'ANIM';this disableAI 'MOVE';" !="this spawn fnc_plyrHit" !="_v setVehicleInit format [\"[this, %1, %2,false,true]spawn BIS_Effects_Burn\",_int, _t];" !="_v setVehicleInit \"[this] spawn BIS_Effects_AirDestruction\";" !="if((local(_this select 0))or(isServer))then{_this call fnc_plyrHit_local;};" !="if(local(_this select 0))then{_this call fnc_plyrDead_local;};"

Open BattlEye/remoteexec.txt
find following line:
5 fnc_

replace with:

1 fnc_
_________________________________________________________________


- I didnt edit the mission files as there was no use as:
"enableRadio false;" is no longer a script in the Init.

""#include "\z\addons\dayz_code\system\REsec.sqf" "" changed to:
"dayz_REsec = 0; // DayZ RE Security / 1 = enabled // 0 = disabled" 0 = Default (Off)

So yeah? I guess I did that right? I think :p
 
Back
Top