New native aliases: onKill & onTK
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6292 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -514,6 +514,8 @@ docident [onDeathOther] [If this alias exists it will be run every time anybody
|
||||
docident [onDeathSelf] [If this alias exists it will be run every time you yourself die.];
|
||||
docident [onSpawnOther] [If this alias exists it will be run every time anybody but yourself spawns.];
|
||||
docident [onSpawnSelf] [If this alias exists it will be run every time you yourself spawn.];
|
||||
docident [onKill] [If this alias exists it will be run every time you kill an enemy.];
|
||||
docident [onTK] [If this alias exists it will be run every time you kill a teammate.];
|
||||
docident [mdldyncache] [];
|
||||
docargument [V] [] [min 1/max 32/default 2];
|
||||
docident [mdlstatcache] [];
|
||||
|
||||
@@ -1432,6 +1432,20 @@ addOnLoadAlways [
|
||||
<identifierReference identifier="onCallVote"/>
|
||||
</references>
|
||||
</scriptalias>
|
||||
|
||||
<scriptalias name="onKill">
|
||||
<description>If this alias exists it will be run every time you kill an enemy.</description>
|
||||
<references>
|
||||
<identifierReference identifier="onTK"/>
|
||||
</references>
|
||||
</scriptalias>
|
||||
|
||||
<scriptalias name="onTK">
|
||||
<description>If this alias exists it will be run every time you kill a teammate.</description>
|
||||
<references>
|
||||
<identifierReference identifier="onTK"/>
|
||||
</references>
|
||||
</scriptalias>
|
||||
|
||||
<scriptalias name="add2alias">
|
||||
<description>This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.</description>
|
||||
|
||||
@@ -770,12 +770,20 @@ void dokill(playerent *pl, playerent *act, bool gib, int gun)
|
||||
else if(isteam(pl->team, act->team))
|
||||
{
|
||||
if(pl==player1) outf("\f2you were %s by teammate %s", death, aname);
|
||||
else outf("%s%s %s teammate %s", act==player1 ? "\f3" : "\f2", aname, death, pname);
|
||||
else
|
||||
{
|
||||
outf("%s%s %s teammate %s", act==player1 ? "\f3" : "\f2", aname, death, pname);
|
||||
if(identexists("onTK")) execute("onTK");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pl==player1) outf("\f2you were %s by %s", death, aname);
|
||||
else outf("\f2%s %s %s", aname, death, pname);
|
||||
else
|
||||
{
|
||||
outf("\f2%s %s %s", aname, death, pname);
|
||||
if(identexists("onKill")) execute("onKill");
|
||||
}
|
||||
}
|
||||
|
||||
if(gib)
|
||||
|
||||
Reference in New Issue
Block a user