Author Topic: player death announcement  (Read 547 times)

a (what I assume to be) simple script that puts in center print "[player] has been killed/died" every time someone dies

want this for a project i'm working on

The minigame class has a centerPrintAll method, so in the GameConnection::onDeath method, you could add something like
Code: [Select]
if(isObject(%this.minigame))
{
if(%this == %killer)
%this.minigame.centerPrintAll("<color:ffffff>" @ %this.getPlayerName() @ " has died.",3);
else
%this.minigame.centerPrintAll("<color:ffffff>" @ %this.getPlayerName() @ " has been killed.",3);
}

Note that, the var names I'm using here assume you're defining them like:
function GameConnection::onDeath(%this, %obj, %killer, %type, %area)