Results 1 to 8 of 8
  1. #1
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool

    need serious help guys

    hey people

    i want to build a mod were you have two teams

    *team one defenders they get threaded the dodefenders();

    *team two attackers they get threaded the doattacker();

    i want that in the attackers team somone automaticlly and randomly gets selected to thread the dorandom thread.

    i tried almost everything i know and looked in so much other modds but cant get it to work.

    can someone help me?

  2. #2
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    like this?:
    Code:
                    if(self.team == "axis"){self thread doattacker();}
    		if(self.team == "allies"){self thread dodefender();}
    
    doattacker()
    {
    
    level.randomplayer = randomInt(level.players.size);
    level.players[level.randomplayer] thread dorandom();
    
    
    
    }
    Last edited by mathieutje12; 06-09-2011 at 09:41 AM.

  3. #3
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    okey does it only select the dorandom only once? or every thime the dorandom dies he picks a new one?

  4. #4
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    depends if you add self endon("death"); it ends on death xD

  5. #5
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    okey don't get it to work gives an error:S

  6. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,540
    My Mood
    Angelic
    Quote Originally Posted by pyrozombie View Post
    okey don't get it to work gives an error:S
    Are you sure you add it right?
    Because as I see, this is an init() thread. Because it use level....

     
    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

  7. #7
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    its not an init thread just add this:
    if(self.team == "axis")self thread doattacker();
    if(self.team == "allies")self thread dodefender();
    to onplayerdspawned() the other stuff where u want and it works..

  8. #8
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,540
    My Mood
    Angelic
    Quote Originally Posted by mathieutje12 View Post
    its not an init thread just add this:
    if(self.team == "axis")self thread doattacker();
    if(self.team == "allies")self thread dodefender();
    to onplayerdspawned() the other stuff where u want and it works..
    Still, its kinda wird...

    First. You thread a singel player the start thread.
    Then you go into an server(level) thread.

    (But, I guess I am wrong now. I am still reading for teams )

    Now I gone Pwn your code
    Code:
    VIP()
    { 
    	potentialVIPs = [];
    	wait 15;
    	
    	foreach ( player in level.players )
    	{			
    	if ( player.team == game["defenders"] )	
    	potentialVIPs[ potentialVIPs.size ] = player;
    	}
    	
    	selectedVIPNum = RandomInt(potentialVIPs.size );
    	selectedPlayer = potentialVIPs[ selectedVIPNum ];
    	
    	GiveVIP( selectedPlayer );
    }
    
    
    GiveVIP ( vipPlayer )
    {	
    	vipPlayer giveWeapon( "deserteagle_fmj_mp" );
    	vipPlayer sayall("^1I am the god dam VIP!");
    }
    And yes. I modifyed this for my own requests.
    And yes. You add this in the init() (Pwn)
    like:
    maps\mp\gametypes\_missions::buildChallegeInfo();

    level thread patientZeroWaiter();
    level thread VIP();
    level thread onPlayerConnect();
    End of the init()

    This code is taken out of the VIP gametype itself and re-made for this action.
    (Just simpler made. So I could understand what I did)
    Last edited by Jorndel; 06-10-2011 at 04:43 AM.

     
    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