Jump to content

[Release] Custom Kill Messages


0verHeaT

Recommended Posts

Everyone,

 

I noticed within this thread alot of server owners are mentioning the server is only registering 50% of the PKILLS thus only providing 50% displayed kill messages.  We get that the server needs to register th PKILL to display in-game display but most of us server owners are looking for a possible fix for this, not an explanation of "how you think it works".  I know this can be fixed because I've seen a WalkingDead DayZ Vanilla server run this same exact script and it works 100% everytime.  With that being said, this leads me to believe that it's not just a Arma2 Engine issue and leaning more to the sqf files and can be fixed some how.  I've sat on my server testing by shooting someone with a DMR straight to there chest 10 feet away and it did NOT register 3-4 times in a row.  How can a server not pick that up as a PKILL?  lol   I know we have some smart/talented scripters, there has to be a way around this..  Anyone have the balls to step up to this fix for Epoch?

 

Thanks,

steamROLLER

Link to comment
Share on other sites

Everyone,

 

I noticed within this thread alot of server owners are mentioning the server is only registering 50% of the PKILLS thus only providing 50% displayed kill messages.  We get that the server needs to register th PKILL to display in-game display but most of us server owners are looking for a possible fix for this, not an explanation of "how you think it works".  I know this can be fixed because I've seen a WalkingDead DayZ Vanilla server run this same exact script and it works 100% everytime.  With that being said, this leads me to believe that it's not just a Arma2 Engine issue and leaning more to the sqf files and can be fixed some how.  I've sat on my server testing by shooting someone with a DMR straight to there chest 10 feet away and it did NOT register 3-4 times in a row.  How can a server not pick that up as a PKILL?  lol   I know we have some smart/talented scripters, there has to be a way around this..  Anyone have the balls to step up to this fix for Epoch?

 

Thanks,

steamROLLER

 

The main reason why some playerhits are not register is desyncs and laggs of the clients.

No matter, how much you customise, you'll never get all kills registered.

 

A friend of mine and me tried this script on a LAN-server (no desync) and we got all kills and hits registerd.

Link to comment
Share on other sites

OverHeat,

 

How come on one of the DayZ WalkingDead server which is a basic vanilla mod get theres to show everytime?  I mean literally every kill registers bro and its on a dedi in a datacenter just like mine.  It's just crazy bro.  I'll give you the IP to that server if u want to check it out for yourself, I just don't understand how they did but no one else can

Link to comment
Share on other sites

OverHeat,

 

How come on one of the DayZ WalkingDead server which is a basic vanilla mod get theres to show everytime?  I mean literally every kill registers bro and its on a dedi in a datacenter just like mine.  It's just crazy bro.  I'll give you the IP to that server if u want to check it out for yourself, I just don't understand how they did but no one else can

 

I feel like you are just trying to advertise, OverHeat's Script is simple and it works as it should. If you feel like there is a better way then you should talk to the server owners and dont look down upon OverHeat's code. 

 

I will share my version of the code once its ready, all credits to the OP.

Link to comment
Share on other sites

No one here is bashing any ones scripts so stop jumping to conclusions.   Nor am I tryin to advertise lol

 

You have mentioned 2 times about that server and how good the kill messages are and here in this script doesn't work

Link to comment
Share on other sites

Gr8boi,

 

I never mentioned the script didn't work bro?  I was simply stating there was another server I saw use this script and works perfectly every time.  I'm not here to advertise, I have my own servers I advertise within different threads.   I'm just hoping to come across some people here that might know how to get the server to register the PKILL more consistently.  For instance, maybe its a CPU or database thing, etc...

 

Any help would be greatly appreciated.

 

Thanks

Link to comment
Share on other sites

Gr8boi,

 

I never mentioned the script didn't work bro?  I was simply stating there was another server I saw use this script and works perfectly every time.  I'm not here to advertise, I have my own servers I advertise within different threads.   I'm just hoping to come across some people here that might know how to get the server to register the PKILL more consistently.  For instance, maybe its a CPU or database thing, etc...

 

Any help would be greatly appreciated.

 

Thanks

 

Mosts kills arent showing just becuase of the weapon image not found. Its skiping lots of kills for that. Its not the server lag. I am working on re modifying fnc_hit but i have been busy these couple of days

Link to comment
Share on other sites

Still getting players spawn at dead bodies. I've used the very latest steps on the first post, checked them several times and I still get this in my error logs:

6:13:41 Error in expression <>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt >
 6:13:41   Error position: <ceil _distance)];
_kill_txt = _kill_txt >
 6:13:41   Error ceil: Type String, expected Number
 6:13:41 File z\addons\dayz_server\compile\server_playerDied.sqf, line 41

EDIT:

Fixed this error by adding:
if (_distance == "nil") then {_distance = 0};
Just underneath:
_distance = _victim getVariable["AttackedFromDistance", "nil"];

Now when a player dies by falling or hit by a zed, a message saying "image NIL" does not exist.. I really like this script, hope the error checking gets fixed in the updates!

Link to comment
Share on other sites

EDIT: This only happens if the player dies from falling.  If the player is killed by AI or Zed, no message comes up.  Not sure why!

 

When a player dies "Nil PlayerName [0]" comes up in top left..

See image below, I've also included the "nil picture" error ..

al6gbo.jpg

Link to comment
Share on other sites

Still getting players spawn at dead bodies. I've used the very latest steps on the first post, checked them several times and I still get this in my error logs:

6:13:41 Error in expression <>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt >
 6:13:41   Error position: <ceil _distance)];
_kill_txt = _kill_txt >
 6:13:41   Error ceil: Type String, expected Number
 6:13:41 File z\addons\dayz_server\compile\server_playerDied.sqf, line 41

EDIT:

Fixed this error by adding:

if (_distance == "nil") then {_distance = 0};

Just underneath:

_distance = _victim getVariable["AttackedFromDistance", "nil"];

Now when a player dies by falling or hit by a zed, a message saying "image NIL" does not exist.. I really like this script, hope the error checking gets fixed in the updates!

 

I followed the install instructions and people still spawn on their body :/

 

Those errors occur if you didn't install my version of the fnc_plyrhit.sqf

You need to check your files again and make sure to use the updated version.

Link to comment
Share on other sites

Those errors occur if you didn't install my version of the fnc_plyrhit.sqf

You need to check your files again and make sure to use the updated version.

I replaced my whole fnc_playerhit with the code you provided in the beggining and the issue still pertains.

private ["_victim", "_attacker","_weapon","_weapon_dmg","_distance","_damage","_weapon_img"];
_victim = _this select 0;
_attacker = _this select 1;
_damage = _this select 2;

if (!isPlayer _victim || !isPlayer _attacker) exitWith {};
if ((owner _victim) == (owner _attacker)) exitWith {
	_victim setVariable["AttackedBy", _victim, true];
};

_weapon = (weaponState _attacker);

_vehicle = typeOf (vehicle _attacker); 

if ((getText (configFile >> "CfgVehicles" >> _vehicle >> "vehicleClass")) in ["CarW","Car","CarD","Armored","Ship","Support","Air","ArmouredW","ArmouredD","SupportWoodland_ACR"]) then {
	_weapon_dmg = getText (configFile >> 'CfgVehicles' >> _vehicle >> 'displayName');
	_weapon_img = gettext(configFile >> 'CfgVehicles' >> _vehicle >> 'picture');
} else {
	_weapon_dmg = gettext (configFile >> 'cfgWeapons' >> (currentWeapon _attacker) >> 'displayName');
	_weapon_img = gettext(configFile >> 'cfgWeapons' >> (currentWeapon _attacker) >> 'picture');
};

_distance = _victim distance _attacker;

diag_log format["PLAYERHIT: %1 was hit by %2 with %3 from %4m with %5 dmg", _victim, _attacker, _weapon_dmg, _distance, _damage];

_victim setVariable["AttackedBy", _attacker, true];
_victim setVariable["AttackedByName", (name _attacker), true];
_victim setVariable["AttackedByWeapon", _weapon_dmg, true];
_victim setVariable["AttackedFromDistance", _distance, true];
_victim setVariable["AttackedByWeaponImg", _weapon_img, true]; 
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
×
×
  • Create New...