Jump to content

Recommended Posts

I'm working on my multiplayer mission and I'd like to ask if there is possible to make killer info in cutText in onPlayerKilled.sqf or any other way but still by cutText. I'm not very experienced with scripting, I can understand to easier scripts or some parts of more difficult scripts. So I'd also like to ask if you would be so nice to also add some explain into code like //This makes...
The respawn timer set by mission is 5 sec. 

My current onPlayerKilled.sqf:

cutText ["","BLACK OUT",4];

My onPlayerRespawn.sqf:

cutText ["","BLACK IN",2];

[player, [missionNamespace, "Var_SavedInventory"]] call BIS_fnc_loadInventory;

So I'd like to make something like "You were killed by <killer> with a <killer_weapon>." in cutText when player is killed.

I tried to edit one script and used it in onPlayerKilled.sqf but it does not work so it must be totally wrong edited... :upside: 

KAI_fnc_killedInfo = {
_killerName = name (_this select 0);
_weaponName = getText (configFile >> "cfgWeapons" >> currentWeapon (_this select 0) >> "displayname");
cutText format [You were killed by %1 with a %2", "BLACK OUT", _killerName, _weaponName];

   _id = _x addMPEventHandler ["MPKilled", {
	_nul = _this call KAI_fnc_killedInfo;
} foreach allUnits; 

Any ideas plese? 

  • Like 1

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now