Post: Trouble In Terrorist Town{HELP}
12-20-2012, 05:51 PM #1
ModdedModder
Gym leader
(adsbygoogle = window.adsbygoogle || []).push({}); I am trying to make the gamemode Trouble In Terrorist Town... But im having problems with the ending of the game... When some one is choosen to be a traitor it adds a value to self.team["Traitor"]. I am trying to make it end the game when all the traitors are gone.... what is wrong with this script???

    doInnocent()
{
self.team2["Innocent"] = 1;
self.team["Innocent"]++;
}
doTraitor()
{
self.team2["Traitor"] = 1;
self.team["Traitor"]++;
}


OnPlayerDeath()
{
for(;Winky Winky
{
self waittill( "death" );
self.Icons[5] destroy();
self thread deathtext();
if(self.team2["Innocent"] == 1)
{
self.team["Innocent"]--;
}
if(self.team2["Traitor"] == 1)
{
self.team["Traitor"]--;
}
wait 1;
self thread checkifdead();
self thread checkifdead2();
}
}
checkifdead()
{
if(self.team["Innocent"] <= 0)
{
self thread doEnding( "Traitors Win" );
}
else if(self.team["Traitor"] >= 1)
{

}
}
checkifdead2()
{
if(self.team["Traitor"] <= 0)
{
self thread doEnding( "Innocents Win" );
}
else if(self.team["Innocent"] >= 1)
{

}
}

doEnding( Text )
{
level.gameState = "ending";
notifyEnding = spawnstruct();
notifyEnding.titleText = "Game Over!";
notifyEnding.notifyText2 = ( Text );
notifyEnding.glowColor = (0.0, 0.6, 0.3);
wait 1;
VisionSetNaked("blacktest", 2);
foreach(player in level.players)
{
player _clearPerks();
player freezeControls(true);
player thread maps\mp\gametypes\_hud_message::notifyMessage( notifyEnding );

}
wait 15;
VisionSetNaked(getDvar( "mapname" ), 2);
foreach(player in level.players)
{
player freezeControls(false);
map_restart(false);
}
}
01-09-2013, 08:27 PM #2
IIFusiionsII
Pokemon Trainer
posting to keep this alive. I just really want to play this on mw2 XD

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo