Files
DayZ-Epoch/dayz_server/compile/server_playerDied.sqf
vbawol dd20524793 1.0.0.2 pre test
+ [FIXED] Can now refuel and siphon while swimming again. Must stay at
same position for 6 seconds.
+ [FIXED] Refuel sound now only plays when an actual refuel/siphon takes
place.
+ [FIXED] Check fuel levels again just before refuel or siphon actions.
+ [FIXED] Player Zombies can now no longer pickup "Take %" objects.
+ [FIXED] Dogs now correctly consume any available raw meat.
+ [FIXED] Machete now spawns correctly, it was missing
WeaponHolder_ItemMachete config.
+ [UPDATED] Updated batttleye scripts.
+ [CHANGED] Gutting zombies and animals now double checks for
"meatHarvested" after animation and before action.
+ [CHANGED] Survivor2_DZ was not in the list of AllPlayers.
+ [CHANGED] Lowered alert radius when gutting zombies to 50m instead of
100m.
+ [CHANGED] Moved all clothes to cfgloots to reduce spawn chances as we
add more. (clothes, militaryclothes, specialclothes)
+ [CHANGED] HMMWV URAL and UAZ road debris now has its own military loot
tables that include sandbags.
+ [CHANGED] New vehicle spawns now have a new damage system using a
random percent between min and max variables. Defaults:
(DynamicVehicleDamageLow = 0; DynamicVehicleDamageHigh = 100;)
+ [CHANGED] Animal count was too low was 5 now 8. Can be overridden with
dayz_maxAnimals set inside mission init.sqf.
+ [ADDED] Taming dogs now has a 50% chance to fail and consume meat,
Chance to tame without failure increases with number of days alive
(dayz_skilllevel).
+ [ADDED] Added spawnMarkerCount variable override to use more spawn
marker locations. (default=4)
+ [ADDED] Added medic animation requirement for gutting zombies and
animals so you can now walk away to cancel gutting process.
+ [ADDED] Added old bandit skin back in as Skin_Bandit2_DZ as a drop on
Residential.
+ [ADDED] New vehicle spawns now have a chance to spawn 0-3 loot
randomly from all cfgloots.
+ [ADDED] Added new desert themed domed camping tent (ItemTentDomed)
that holds 75 mags, 12 weapons, and 7 backpacks - thanks to vRNemesis
for model and texture.
+ [ADDED] Added server side ability to enabled taming dogs and can be
enabled by setting dayz_tameDogs = true; within mission init.sqf.
(default: false)
+ [ADDED] Added parachute spawning players as a server side option
enable server side with the variable dayz_paraSpawn = true; within
mission init.sqf. (default: false)
+ [ADDED] Randomly spawning (like helicopter crashes) Mass Grave with
8-16 zombies and 2x more loot.
+ [REMOVED] Commented out remaining unused call to stream_locationCheck.
+ [INFO] Changes can be made to all zombie spawn variables via the
mission init.sqf (defaults: dayz_maxLocalZombies = 40;
dayz_maxGlobalZombies =30; dayz_maxZeds = 500;)
+ [INFO] DZEdebug = true; (default: false) will enable debug so that
road debris and new vehicle spawns are visible via map markers. Also
debug will enable "Save to arma.RPT" that allows access of a tool to
obtain lootpos information for buildings used for adding support for
additional maps.
2013-04-10 08:54:13 -05:00

99 lines
3.3 KiB
Plaintext

private["_characterID","_minutes","_newObject","_playerID","_playerName","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_eh","_body","_method","_name"];
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
_characterID = _this select 0;
_minutes = _this select 1;
_newObject = _this select 2;
_playerID = _this select 3;
_playerName = _this select 4;
_infected = _this select 5;
_victim removeAllEventHandlers "MPHit";
_victim = _this select 2;
_victimName = _victim getVariable["bodyName", "nil"];
_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;
};
if(DZE_DeathMsgSide) then {
[nil, nil, rspawn, [_killer, _message], { (_this select 0) sideChat (_this select 1) }] call RE;
};
if(DZE_DeathMsgTitleTextLocal) then {
[nil,nil,"loc",rTITLETEXT,_message,"PLAIN DOWN"] 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.
PlayerDeaths set [count PlayerDeaths,_message];
// 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];
/*
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:%3:",_characterID,_minutes,_infected];
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;
}
else
{
deleteVehicle _newObject;
};
diag_log ("PDEATH: Player Died " + _playerID);
/*
_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];