gTeams help
#1

So I am creating a simple script, just to learn PAWNO and understand it better, and I came across adding two teams, I added everything alright (because it isn't giving any errors) but I don't know if it even is added properly, because for the team 1 I set the spawn place to groove street and the second team to abandoned airport but when any of the team spawn it is in lv near the moving stairs, and neither does the set color for the team work. IDK, what the problem is? I just followed the tut given HERE.
Can anyone help?
Reply
#2

You are having something like this at OnPlayerSpawn?
pawn Код:
if (gTeam[playerid] == TEAM_NOOBS)
{
    SetPlayerColor ...
    SetPlayerPos ...
    // Go on
}
else if (gTeam[playerid] == TEAM_GANG)
{
    SetPlayerColor ...
    SetPlayerPos ....
    // Go on
}
else if (gTeam[playerid] == TEAM_MAFIA)
{
    SetPlayerColor ...
    SetPlayerPos ...
    // Go on
}
Reply
#3

No there is something like for the colors
under on player spawn
Код:
SetPlayerTeamForClass(playerid, classid);
and then somewhere random in the gm
pawn Код:
SetPlayerTeamForClass(playerid, classid)
{
    if((classid == 0) || (classid == 1) || (classid == 2))
    {
    gTeam[playerid] = TEAM_ZOMBIES;
    return 1;
    }
    if((classid == 3) || (classid == 4) || (classid == 5))
    {
    gTeam[playerid] = TEAM_HUMANS;
    return 1;
    }
    return 1;
}
and yeah the spawn thing is the same

EDIT: Got the Spawn thing to work, now i need help with the colors, details above ^^^^
Reply
#4

You can use the code I gave you for the colors.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)