players = maps\mp\gametypes\_teams::CountPlayers();
How can I count players on each team, so that I can use that variable for ending the game? I'm counting events that happen when players are alive, and need to compare that to total players on each team.
By the way, this is 'Freeze Tag'. I'm trying to end the game after all the players on one team are frozen, making the other team the winners.
players = maps\mp\gametypes\_teams::CountPlayers();
Join to play in modded servers(MW2 and BO):[/COLOR]
https://steamcommunity.com/groups/mw2zombiemod
Selling Lvl 64 Guardian Account - Adventure Quest - Battleon
Pm me if you are interested.
Buy Black Ops []
Prestige []
Make my first mod for BO []
Host a server []
chrisdavis97 (10-27-2010)
Okay, I'm almost there, but I have to finish that script.
something like:
if(level.Frozen[self.team] == players) //help here... tried players, "players", +players+, "+players+"
{ etc... }
How do I apply it?
just a heads up, level.Frozen at times can be glitchy (ex. counts too many players)
try this:
Code:if(level.Frozen[self.team] == players[self.team]){ ... }
chrisdavis97 (10-30-2010)
Syntax Error.Code:for(;;) { self waittill("spawned_player"); if(self.team == "allies") OppsTeam = "axis"; if(self.team == "axis") OppsTeam = "allies"; players = maps\mp\gametypes\_teams::CountPlayers(); if(level.Frozen[self.team] == players[self.team]) { level thread maps\mp\gametypes\_gamelogic::forceEnd(); } else if(level.Frozen[OppsTeam] == players[OppsTeam]) { level thread maps\mp\gametypes\_gamelogic::forceEnd(); } }
But, if I change players[self.team] (and same for OppsTeam) to 6, or any other number, it loads fine.
EDIT: My bad. Sleep Deprived, I forgot I changed another part of the script. So... it loads fine now, but instantly ends the game with a DRAW.
Last edited by chrisdavis97; 10-27-2010 at 11:12 PM.
[php]maps\mp\gametypes\_gamescore::_setTeamScore("allie s", 2000);
maps\mp\gametypes\_gamescore::_setTeamScore("axis" , 2000);
[/php]
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
he said the game ends in a draw:
EDIT: My bad. Sleep Deprived, I forgot I changed another part of the script. So... it loads fine now, but instantly ends the game with a DRAW.
this is the code for set points at the end of the game...
Sorry, clarification, the moment the game loads, before the timer is finished counting down to run off and kill... it ends, and since no one has any kills, it results in a DRAW...
The Draw wasn't the concern, the concern is getting the script to count team players, and compare to frozen players, resulting in Ending the Game if Total Frozen equals Total Team Players.
chrisdavis97 (10-30-2010)
Yeah, you're right. I changed it up a bit to allow someone to join...
I got it working, and you're right... level.Frozen is VERY glitchy...Code:if((players[self.team] > 0) && (level.Frozen[self.team] == players[self.team])) { level thread maps\mp\gametypes\_gamelogic::forceEnd(); } if((players[OppsTeam] > 0) && (level.Frozen[OppsTeam] == players[OppsTeam])) { level thread maps\mp\gametypes\_gamelogic::forceEnd(); }
We'll work on another way around it, but for now, it's kinda fun to play with.
btw i got already a mod something like that calls freetag too
Care to share? I did a search, and didn't see anything on MPGH. If not, that's okay too.
So, at this point, it's not very fun to play, because it doesn't work properly. I am thinking of a few ideas I can do to make it better.
1. Keep existing conditions, but give a timer once frozen to unfreeze after 30 seconds.
2. Keep existing conditions, but give a timer, as stated above, but it's a timer of death. (I'm diggin this idea, maybe with S&D settings)
3. Re-write the freezing method, to count the actions, instead of the self.frozen code.
What do you think?
EDIT: Another option would be to place them in a holding cell (Jail) when they are knifed (frozen), with a designated location per map, care package walls, etc.
Last edited by chrisdavis97; 10-30-2010 at 06:32 PM.