Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried

    RounDSystem Change map, all are dead

    _RoundSystem.gsc

    Hi, I'm looking for a code that can change the map when all
    are dead.
    I could not find it on any page.

    ----> Sorry My english <----

  2. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    Try this if(level.aliveCount["axis"] == "0" && level.aliveCount["allies"] == "0")
    {
    map mp_highrise


    }
    Last edited by mathieutje12; 06-14-2011 at 09:40 AM.

  3. #3
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    me, I'll try

  4. #4
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    script error

  5. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by darkorlegend View Post
    script error
    If it was in a pastebin.com "file" I would check it. but since its on this page as a code. i won't. So, your call. ( Sorry, to lazy to wait for the mouse to get to the end..)

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  6. #6
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    send me your code pastebin please

  7. #7
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    Script Compile error
    function 'countplayers' already defined
    [See console for details]

    In _teams.gsc
    CountPlayers()
    {
    //chad
    players = level.players;
    allies = 0;
    axis = 0;
    for(i = 0; i < players.size; i++)
    {
    if ( players[i] == self )
    continue;

    if((isdefined(players[i].pers["team"])) && (players[i].pers["team"] == "allies"))
    allies++;
    else if((isdefined(players[i].pers["team"])) && (players[i].pers["team"] == "axis"))
    axis++;
    }
    players["allies"] = allies;
    players["axis"] = axis;
    return players;
    }
    RoundSystem.gsc
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;


    doPlaying()
    {
    level.playersLeft = maps\mp\gametypes\_teams::CountPlayers();
    wait 5;
    while(1)
    {
    level.playersAlive = maps\mp\gametypes\_teams::CountPlayers();
    if(level.lastAlive == 0){
    if(level.playersAlive["allies"] == 1){
    level.lastAlive = 1;
    foreach(player in level.players){
    if(player.team == "allies"){
    level.lastplayer = player;
    player thread maps\mp\gametypes\HumanZombie::doLastAlive();
    level thread teamPlayerCardSplash( "callout_lastteammemberalive", player, "allies" );
    level thread teamPlayerCardSplash( "callout_lastenemyalive", player, "axis" );
    }
    }
    }
    }
    if(level.aliveCount["axis"] == "0" && level.aliveCount["allies"] == "0"){
    map mp_highrise
    }


    foreach(player in level.players)
    {
    if(player.xxx2 == 0)
    {
    player thread maps\mp\gametypes\HumanZombie::doZombie();
    }
    }
    wait .1;
    }
    }
    RoundSystem is QCZM
    Last edited by darkorlegend; 06-14-2011 at 03:55 PM.

  8. #8
    master131backup's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    94
    Reputation
    19
    Thanks
    163
    My Mood
    Angelic
    You can't call the variable the same thing as the function. :3

  9. #9
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    u got 2 times the same thing:
    level.playersLeft = maps\mp\gametypes\_teams::CountPlayers();
    level.playersAlive = maps\mp\gametypes\_teams::CountPlayers();

  10. #10
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    delente one?

  11. #11
    TechnoX's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Logitech G510.
    Posts
    154
    Reputation
    11
    Thanks
    3
    My Mood
    Yeehaw
    Yes... Delete level.playersLeft = maps\mp\gametypes\_teams::CountPlayers(); should work
    I have big mess.

  12. #12
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    Error:
    ******* script compile error *******
    Error: function 'countplayers' already defined
    ************************************
    ********************
    ERROR: script compile error
    function 'countplayers' already defined

    (see console for details)

    ********************
    CL_Disconnect called for local client 0



    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;


    doPlaying()
    {
    wait 5;
    while(1)
    {
    level.playersAlive = maps\mp\gametypes\_teams::CountPlayers();
    if(level.lastAlive == 0){
    if(level.playersAlive["allies"] == 1){
    level.lastAlive = 1;
    foreach(player in level.players){
    if(player.team == "allies"){
    level.lastplayer = player;
    player thread maps\mp\gametypes\HumanZombie::doLastAlive();
    level thread teamPlayerCardSplash( "callout_lastteammemberalive", player, "allies" );
    level thread teamPlayerCardSplash( "callout_lastenemyalive", player, "axis" );
    }
    }
    }
    }
    if(level.aliveCount["axis"] == "0" && level.aliveCount["allies"] == "0"){
    map mp_highrise
    }


    foreach(player in level.players)
    {
    if(player.xxx2 == 0)
    {
    player thread maps\mp\gametypes\HumanZombie::doZombie();
    }
    }
    wait .1;
    }
    }
    Last edited by darkorlegend; 06-15-2011 at 01:21 PM.

  13. #13
    idiot2010's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    174
    Reputation
    9
    Thanks
    6
    My Mood
    Paranoid
    not rly hard
    Code:
    GameEnded()
    {	
    	while( 1 )
    	{
    	players = maps\mp\gametypes\_teams::CountPlayers();
    	
    		if(players["allies"] == 0)
    		{
                    map mp_highrise
    			break;
    		}
    		
    	wait 0.05;
    	}
    }

  14. #14
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by idiot2010 View Post
    not rly hard
    Code:
    GameEnded()
    {	
    	while( 1 )
    	{
    	players = maps\mp\gametypes\_teams::CountPlayers();
    	
    		if(players["allies"] == 0)
    		{
                    map mp_highrise
    			break;
    		}
    		
    	wait 0.05;
    	}
    }
    This migh be wrird to ask but.
    won't this give an error?

    map mp_highrise
    Because it have no finction or so....
    everything I have seen ends with ; or { | } so....
    I found this wird...

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  15. #15
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    maybe this:
    Code:
    selectrandommap()
    {
    if (level.aliveCount["axis"] == 0 && level.team["axis"] != 0 && level.aliveCount["allies"] == 0 && level.team["allies"] != 0){
    			wait 2;
    mapnames = "mp_brecourt;mp_rundown;mp_afghan;mp_checkpoint;mp_quarry;mp_highrise;mp_boneyard;mp_derail;mp_rust;mp_favela;mp_estate;mp_terminal;mp_underpass;mp_subbase;mp_invasion;";
    	mapa = getDvar("mapname");
    	mapchoice = StrTok( mapnames, ";" ); 
    	newmap = mapchoice[randomint(mapchoice.size)];
    	while(newmap == mapa) {
    		newmap = mapchoice[randomint(mapchoice.size)];
    	}	
    	Map(newmap, false);}   
    }
    Last edited by mathieutje12; 06-18-2011 at 11:52 AM.

Page 1 of 2 12 LastLast