Question[Solved]Two Different Teams

Posts 1–9 of 9 · Page 1 of 1
[Solved]Two Different Teams
I am trying to make a mod with 2 teams having different weapons, perks, and dvars. I am new to modding, so i don't exactly know how to separate the 2 teams into separate sections within the code. I have already checked some other mods, but I can't seem to find a way to do it right.
Code:
if(self.team == "axis")
{
    //Do stuff if you are on Spetsnaz or OpFor
}
if(self.team == "allies")
{
    //Do stuff if you are on TF141 or Rangers
}
Quote Originally Posted by master131 View Post
Code:
if(self.team == "axis")
{
    //Do stuff if you are on Spetsnaz or OpFor
}
if(self.team == "allies")
{
    //Do stuff if you are on TF141 or Rangers
}
Fixed your typo lol
Quote Originally Posted by master131 View Post
Code:
if(self.team == "axis")
{
    //Do stuff if you are on Spetsnaz or OpFor
}
if(self.team == "allies")
{
    //Do stuff if you are on TF141 or Rangers
}
ah thanks i was sorta looking for this too
:(
Quote Originally Posted by master131 View Post
Code:
if(self.team == "axis")
{
    //Do stuff if you are on Spetsnaz or OpFor
}
if(self.team == "allies")
{
    //Do stuff if you are on TF141 or Rangers
}
Does this have to be placed in a specific place? My mod still isn't working.
/marked as solved
Yup
yes i have tried to put in under onplayerspawned, does it need to go in a specific place in there? it's bad syntax, if that matters
Code:
onPlayerSpawned()
{
    self endon("disconnect");

    for(;;)
    {
        self waittill("spawned_player");
        if(self.team == "axis")
        {
             //Do stuff if you are on Spetsnaz or OpFor
        }
        if(self.team == "allies")
        {
            //Do stuff if you are on TF141 or Rangers
        }

    }
}
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us