Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request When connected
#1
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");
}
Reply

#2
Code:
if(self.pers["team"] == "axis")
   self  [[level.allies]]();
[Image: 1fxsnb.jpg]
Reply

#3
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");
}
Reply

#4
(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
[Image: wyipjqo9qon7rc2v1lo.jpg]
Reply

#5
Everyone just ignore my comments do they?

Code:
When_Died()
{
    self waittill("death");
    self [[level.axis]]();
}
[Image: 1fxsnb.jpg]
Reply

#6
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
Reply



Forum Jump:


Users browsing this thread:
4 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.