Random Spawn Seperate Teams HELP
#4

Replace this function with the code I've changed for you:

pawn Код:
public SetPlayerRandomSpawn(playerid)
{
    if (iSpawnSet[playerid] == 1)
    {
        new rand = random(sizeof(gGrovePlayerSpawns));
        SetPlayerPos(playerid, gGrovePlayerSpawns[rand][0], gGrovePlayerSpawns[rand][1], gGrovePlayerSpawns[rand][2]); // Warp the player
        SetPlayerFacingAngle(playerid, 270.0);
    }
    else if (iSpawnSet[playerid] == 0)
    {
        new rand = random(sizeof(gAztecaPlayerSpawns));
        SetPlayerPos(playerid, gAztecaPlayerSpawns[rand][0], gAztecaPlayerSpawns[rand][1], gAztecaPlayerSpawns[rand][2]); // Warp the player
        SetPlayerFacingAngle(playerid, 270.0);
    }
    else if (iSpawnSet[playerid] == 2)
    {
        new rand = random(sizeof(gVagosPlayerSpawns));
        SetPlayerPos(playerid, gVagosPlayerSpawns[rand][0], gVagosPlayerSpawns[rand][1], gVagosPlayerSpawns[rand][2]);
        SetPlayerFacingAngle(playerid, 270.0);
    }
    else if (iSpawnSet[playerid] == 3)
    {
        new rand = random(sizeof(gCopPlayerSpawns));
        SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]);
    }
    return 1;
}
Variable/array names are extremely sensitive, you seem to have mistyped the array names for the spawns, be a little more vigilant next time.
Reply


Messages In This Thread
Random Spawn Seperate Teams HELP - by tronikk - 03.08.2011, 23:03
Re: Random Spawn Seperate Teams HELP - by Calgon - 03.08.2011, 23:11
Re: Random Spawn Seperate Teams HELP - by tronikk - 03.08.2011, 23:12
Re: Random Spawn Seperate Teams HELP - by Calgon - 03.08.2011, 23:16
Re: Random Spawn Seperate Teams HELP - by tronikk - 03.08.2011, 23:25
Re: Random Spawn Seperate Teams HELP - by Calgon - 03.08.2011, 23:28
Re: Random Spawn Seperate Teams HELP - by tronikk - 03.08.2011, 23:31

Forum Jump:


Users browsing this thread: 1 Guest(s)