Spawn problem.
#1

Edit: Nvm
Reply
#2

http://pastebin.com/Wq9RaXUF
Reply
#3

I've tried this under OnPlayerSpawn
pawn Код:
if(CurrentMap == 0)
    {
        switch (gTeam[playerid])
        {
            case 0: //team 1
            {
                new Random = random(sizeof(PropSpawns));
                SetPlayerPos(playerid, PropSpawns[Random][Pos][0], PropSpawns[Random][Pos][1], PropSpawns[Random][Pos][2]);
                SetPlayerFacingAngle(playerid, PropSpawns[Random][Pos][3]);
            }
            case 1: //team 2
            {
                new Random = random(sizeof(HunterSpawns));
                SetPlayerPos(playerid, HunterSpawns[Random][Pos][0], HunterSpawns[Random][Pos][1], HunterSpawns[Random][Pos][2]);
                SetPlayerFacingAngle(playerid, HunterSpawns[Random][Pos][3]);
            }
        }
        CurrentMap = 1;
    }
    else if(CurrentMap == 1)
    {
        switch (gTeam[playerid])
        {
            case 0: //team 1
            {
                new Random = random(sizeof(PropSpawns));
                SetPlayerPos(playerid, PropSpawns[Random][Pos][0], PropSpawns[Random][Pos][1], PropSpawns[Random][Pos][2]);
                SetPlayerFacingAngle(playerid, PropSpawns[Random][Pos][3]);
            }
            case 1: //team 2
            {
                new Random = random(sizeof(HunterSpawns));
                SetPlayerPos(playerid, HunterSpawns[Random][Pos][0], HunterSpawns[Random][Pos][1], HunterSpawns[Random][Pos][2]);
                SetPlayerFacingAngle(playerid, HunterSpawns[Random][Pos][3]);
            }
        }
        CurrentMap = 0;
    }
    return 1;
}
It all works fine now, But the spawn positions is always of Map 0 .... I spawn at map 0 spawn positions when it's map 0 and even if it is map 1,.. Anyone? :/
Reply
#4

can anyone help me??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)