Map Changing :D
#1

what is wrong in this.. :P
pawn Code:
public OnPlayerSpawn(playerid)
{
    switch (Map)
    {
        case 0:
        {
            SendRconCommand("mapname cs_italy");

           //Loading(playerid);

            if (gTeam[playerid] == TEAM_COUNTER)
            {
                SetPlayerPos(playerid, 716.8705,-2308.6211,107.9117);
            }
            if (gTeam[playerid] == TEAM_TERRO)
            {
                SetPlayerPos(playerid,684.1284,-2409.9363,107.1745);
            }
        }
        case 1:
        {
            SendRconCommand("mapname de_dust2");

           // Loading(playerid);

            if (gTeam[playerid] == TEAM_COUNTER)
            {
                SetPlayerPos(playerid,4427.6431,-1640.7981,22.3554);
            }
            if (gTeam[playerid] == TEAM_TERRO)
            {
                SetPlayerPos(playerid, 4354.7001, -1682.3000, 25.5);
            }
        }
    }
    return 1;
}
eventhough it is compiling...its not teleporting me to the places why? D:
Reply
#2

Where do you set gTeam[playerid]? Also, where do you set 'Map'?
Reply
#3

map on GameModeInit..and gTeam is on top of script as : new gTeam[MAX_PLAYERS];
is this wrong o
Reply
#4

Why did you make new thread for this. Actually, you could continue at https://sampforum.blast.hk/showthread.php?tid=296664
Reply
#5

didn't help..
Reply
#6

Maybe you're spawning with a skin that's not in the team.
Reply
#7

there might be an error somewhere else since its too less code to be sure...
(Map and gTeam variables)

maybe this helps?: https://sampforum.blast.hk/showthread.php?tid=223550/
Reply
#8

ok i will try it..thx..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)