Jump to content

[Release] Custom Kill Messages


0verHeaT

Recommended Posts

I like the look of this, but I got to thinking... would it be possible to have it so that only certain UID's (Admins) can see the messages?

(Death messages are off on our server but this would make the Admins' lives a little easier.)

 

Maybe something like what custom loadout scripts use?

 

Make an kill_msg_check.sqf, load it via mission init.sqf:

[] execVM "kill_msg_check.sqf";

Then in kill_msg_check.sqf.

waitUntil {(getPlayerUID player) != ""};

_loadList = ["ADMINID1", "ADMINID2"];

_lpID = getPlayerUID player;
 
if ((_lpID in ["ADMINUID1"]) && (_lpID in _loadList)) then
{
    [] execVM "kill_msg.sqf";
}

Would something like that work?

 

I'm probably off the mark there but thought I'd ask.

Link to comment
Share on other sites

Description

 

Get all kill notification nicely displayed in the left upper corner. This will include the picture of the gun and the shot distance.

 

The format will look like that:

 

[killer] ['image'] [victim] ['distance in meters']

 

To see how it will look like in game:

f-msg542161580017a355.jpg

 

 

How to edit this when messages dont show kill distance?

My players dont want it...

In text messages i edit, but in your code where i must to edit, be cool to see same code without distance

 

b_560_95_1.png

Link to comment
Share on other sites

How to edit this when messages dont show kill distance?

My players dont want it...

In text messages i edit, but in your code where i must to edit, be cool to see same code without distance

 

b_560_95_1.png

 

Just replace this

_kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_pic,_victimName,(ceil _distance)];

with 

_kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName];
_kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3</t>",_killerName,_pic,_victimName];
Link to comment
Share on other sites

Hi, anyone that can tell me how to change the text size to be a bit smaller maybe?? thanks

 

Find this bit :

_kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_pic,_victimName,(ceil _distance)];

Change 

size='1.0'

To what ever size you want and change each line size

Link to comment
Share on other sites

 

Just replace this

_kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3 </t>",_killerName,_pic,_victimName,(ceil _distance)];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'>[%4m]</t>",_killerName,_pic,_victimName,(ceil _distance)];

with 

_kill_txt = format ["<t align='left' size='0.9'>%1 </t>",_killerName,_pic,_victimName];
_kill_txt = _kill_txt + format ["<img size='1.0' align='left' image='%2'/>",_killerName,_pic,_victimName];
_kill_txt = _kill_txt + format ["<t align='left' size='0.9'> %3</t>",_killerName,_pic,_victimName];

Thanks

Link to comment
Share on other sites

Still getting players spawning back at there bodies aswell as alot of picture nilm not found sent to all clients on most deaths

 

 

 

16:24:29 Error in expression <>%1 </t>",_killerName,_pic,_victimName,(ceil _distance)];

_kill_txt = _kill_txt >
16:24:29   Error position: <ceil _distance)];
_kill_txt = _kill_txt >
16:24:29   Error ceil: Type String, expected Number
16:24:29 File z\addons\dayz_server\compile\server_playerDied.sqf, line 41
 
Link to comment
Share on other sites

I was able to fix most of the issues but player duping is the one i cant fix

 

Still getting players spawning back at there bodies aswell as alot of picture nilm not found sent to all clients on most deaths

 

Remember to use the updated instruction to install this script.

All bugs are already fixed. 

Link to comment
Share on other sites

I'm currently having a problem with my server, I'm not getting any error messages in the console that I can see. Which makes me think the issue is client side in the pbo file when a player joins the splash screen for epoch loading stays up even when the player has loaded. Eventually you can walk and hear the character walking. Anyone know of the issue? Did I put the kill_msg.sqf file in the wrong spot? (I put it a folder in the directory and referenced it in the init.sqf)

Link to comment
Share on other sites

Dunno if it had been discussed somewhere ese. The script seems to be working: : but not everytime the custom message is displayed on the left upper right corner.

 

What could be the source of this issue? I am usisng infistar, could that be the reason?

Link to comment
Share on other sites

Still get players respawning at there bodies, does the code in playerdied go in before the closing bracket or out?

Just after

_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance]; 

Check your fnc_plyrHit.sqf if you get the respawn bug.

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