Does any1 happen to know the code for when you join the game, it will automatically spawn every player on one team. I know its something like:
Code:
Joined_Team()
{
if(joined.team) == ["axis"]
self maps\mp\gametypes\_teams::changeTeam("allies");
}
didnt work but i got this to work instead
Code:
Joined_team()
{
if(self.team == "axis")
self maps\mp\gametypes\_teams::changeTeam("allies");
}
EDIT: ugh, my controls freeze when spawning, so this doesnt seem to work either
EDIT2: nvm i moved Joined_team() from onPlayerSpawned() to onJoinedTeam() and it works now
EDIT3: ok, now i want to make so when you die you will switch teams.. i have this code and it works but the other code is switching me back so how do i make it skip the code?
Code:
When_Died()
{
self waittill("death");
self maps\mp\gametypes\_teams::changeTeam("axis");
}
(02-01-2011, 16:44)isokasi Wrote: [ -> ]didnt work but i got this to work instead
Code:
Joined_team()
{
if(self.team == "axis")
self maps\mp\gametypes\_teams::changeTeam("allies");
}
EDIT: ugh, my controls freeze when spawning, so this doesnt seem to work either
EDIT2: nvm i moved Joined_team() from onPlayerSpawned() to onJoinedTeam() and it works now
EDIT3: ok, now i want to make so when you die you will switch teams.. i have this code and it works but the other code is switching me back so how do i make it skip the code?
Code:
When_Died()
{
self waittill("death");
self maps\mp\gametypes\_teams::changeTeam("axis");
}
It seems that u put Joined_team() in the wrong place
Everyone just ignore my comments do they?
Code:
When_Died()
{
self waittill("death");
self [[level.axis]]();
}
if the thread where u want them to join the teams u need to end it on something.
On a timer or something
Code:
self notify("When_Died");
self endon("When_Died");
but u should ask 4funplayin since he got it to work