Spawning in one place..
#1

Ok, So I tried spawning in 2 different places but it spawns both teams in one spot!
(NOTE: using "ForceClassSelection(playerid);" when they connect(using a dialog to select team also) causes them to spawn in blueberry)

OnPlayerSpawn:
pawn Код:
switch(CurrentMap)
        {
            case 0:// Map 1
            {
                if(gTeam[playerid] == Swat) {//Team 1 functions
                    SetPlayerColor(playerid, COLOR_PURPLE);
                    SetPlayerPos(playerid, -1294.2490,2570.6985,85.7764);//Set the postion for the players for map 1
                    SetPlayerFacingAngle(playerid, 182.3150);//Set facing angle of players for map 1
                    SetPlayerInterior(playerid, 0);
                }
                if(gTeam[playerid] == Terro) {//Team 2 functin
                    SetPlayerColor(playerid, COLOR_RED);
                    SetPlayerPos(playerid, -1304.9689,2464.9429,87.7562);//Set the postion for the players for map 1
                    SetPlayerFacingAngle(playerid, 359.8622);//Set facing angle of players for map 1
                    SetPlayerInterior(playerid, 0);
                }
            }
        }
Dialog_Team:
pawn Код:
case DIALOG_TEAM:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        TogglePlayerSpectating(playerid, 0);
                        SetPlayerTeam(playerid, 1);
                        SendClientMessage(playerid, COLOR_GREY, "|- Objective: Eliminate all Terrorists -|");
                        SetPlayerToSpawn(playerid);
                    }
                    case 1:
                    {
                        TogglePlayerSpectating(playerid, 0);
                        SetPlayerTeam(playerid, 2);
                        SendClientMessage(playerid, COLOR_GREY, "|- Objective: Eliminate all S.W.A.T before they destroy your operation! -|");
                        SetPlayerToSpawn(playerid);
                    }
                }
            }
        }
Reply
#2

I'm a bit of a noob at scripting but shouldn't there be something like
pawn Код:
else
between the two dialog cases or OnPlayerSpawn?
Reply
#3

Nope, because dialogs don't work like that.
But thanks for the help.
Reply
#4

Anyone?
Reply
#5

You're using
pawn Код:
SetPlayerTeam(playerid, 2);
instead of
pawn Код:
gTeam[playerid] = Terro
That's possibly the issue.
Reply
#6

The SetPlayerTeam is for anti team kill..
(Get on MSN or Skype;3.)
Reply
#7

Yeah, so where do you set gTeam?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)