Helpneed serious help guys

Posts 1–8 of 8 · Page 1 of 1
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?
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();



}
okey does it only select the dorandom only once? or every thime the dorandom dies he picks a new one?
depends if you add self endon("death"); it ends on death xD
okey don't get it to work gives an error:S
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....
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..
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)
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?