Jump to content

[Release] Custom Kill Messages


0verHeaT

Recommended Posts

I just put this on my server and tested it out.. Man it's awesome!!! Great script

 

 

Just one thing, I am also getting the BLUFOR messages to pop in sidechat as well . Would you know how to disable this ?

 

Thank you in advance 

DZE_DeathMsgGlobal = false;

Set this to false in your init.sqf

Link to comment
Share on other sites

Yer most the time someone gets shot says nil / run someone over says nil when that happens people think im killing them will "admin hacks" when im not even on line ....

 

This could be avoided by checking if the killername, distance...etc. nil is and only execute this if it is not nil.

Give me a moment...

Link to comment
Share on other sites

To fix the nil errors add this (instead of the old part)

                if ((_killername == "STRING") and ((currentWeapon _killer) == "STRING")) then {
			_pic = gettext(configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture');
			_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)];

			customkillMessage = [_kill_txt];
			publicVariable "customkillMessage";
		};

below

_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
Link to comment
Share on other sites

 

To fix the nil errors add this (instead of the old part)

                if ((_killername == "STRING") and ((currentWeapon _killer) == "STRING")) then {
			_pic = gettext(configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture');
			_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)];

			customkillMessage = [_kill_txt];
			publicVariable "customkillMessage";
		};

below

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

 

 

No message come up on this

Link to comment
Share on other sites

    _pic = gettext(configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture');
    _kill_txt = format ["<t align='left' size='0.65'>%1 </t>",_victimName,_pic,_distance,_killerName];
    _kill_txt = _kill_txt + format ["<img size='0.75' align='left' image='%2'/>",_victimName,_pic,_distance,_killerName];
    _kill_txt = _kill_txt + format ["<t align='left' size='0.65'>(%3m)</t>",_victimName,_pic,_distance,_killerName];
    _kill_txt = _kill_txt + format ["<t align='left' size='0.65'> %4 </t>",_victimName,_pic,_distance,_killerName];
    
Link to comment
Share on other sites

like this?? something tells me this don't look right?

 

        _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];
if ((_killername == "STRING") and ((currentWeapon _killer) == "STRING")) then {
            _pic = gettext(configFile >> 'cfgWeapons' >> (currentWeapon _killer) >> 'picture');
            _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)];

            customkillMessage = [_kill_txt];
            publicVariable "customkillMessage";
        };
    };

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