Name | Author | Game Mode | Rating | |||||
---|---|---|---|---|---|---|---|---|
h? | Violet CLM | Mutator | 10 |
#pragma name "h?"
array<int> LastHealths(jjLocalPlayerCount, -1);
bool playerHasFlag(const jjPLAYER@ play) {
return play.flag > 0 && jjObjects[play.flag].var[0] == play.playerID + CREATOR::PLAYER;
}
void onPlayer(jjPLAYER@ play) {
if (!playerHasFlag(play))
LastHealths[play.localPlayerID] = -1; //any health while carrying a flag will be different from the health while not carrying a flag
else if (LastHealths[play.localPlayerID] != play.health) {
LastHealths[play.localPlayerID] = play.health;
if (play.health > 0)
jjChat("" + play.health, true);
}
}
void onChat(int, string &in stringReceived, CHAT::Type chatType) {
if (chatType == CHAT::TEAMCHAT && jjRegexMatch(stringReceived, "h\\??", true)) {
for (int i = 0; i < jjLocalPlayerCount; ++i)
if (playerHasFlag(jjLocalPlayers[i])) {
jjChat("" + jjLocalPlayers[i].health, true);
break;
}
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.