Random Spawns for Teams
#2

pawn Код:
public OnPlayerSpawn (playerid)
{
    new MexiSpawns = random(sizeof(MexicanSpawns));
    new AmericSpawns = random(sizeof(AmericanSpawns));
    new BPSpawns = random(sizeof(BorderPatrolSpawns));

    if(gTeam[playerid] == TEAM_MEXICAN)
    {
        SetPlayerPos(playerid, MexicanSpawns[MexiSpawns][0], MexicanSpawns[MexiSpawns][1], MexicanSpawns[MexiSpawns][2]);
        SetPlayerFacingAngle(playerid, MexicanSpawns[MexiSpawns][3]);
        GivePlayerWeapon(playerid, 24, 1);
    }
    else if (gTeam[playerid] == TEAM_AMERICAN)
    {
        SetPlayerPos(playerid, AmericanSpawns[AmericSpawns][0], AmericanSpawns[AmericSpawns][1], AmericanSpawns[AmericSpawns][2]);
        SetPlayerFacingAngle(playerid, AmericanSpawns[AmericSpawns][3]);
        GivePlayerWeapon(playerid, 24, 2);
    }
    else if (gTeam[playerid] == TEAM_BP)
    {
        SetPlayerPos(playerid, BorderPatrolSpawns[BPSpawns][0], BorderPatrolSpawns[BPSpawns][1], BorderPatrolSpawns[BPSpawns][2]);
        SetPlayerFacingAngle(playerid, BorderPatrolSpawns[BPSpawns][3]);
        GivePlayerWeapon(playerid, 24, 3);
    }
    return 1;
}
Reply


Messages In This Thread
Random Spawns for Teams - by andrew2695 - 24.06.2012, 21:59
Re: Random Spawns for Teams - by [NWA]Hannes - 24.06.2012, 22:15
Re : Random Spawns for Teams - by andrew2695 - 24.06.2012, 22:24

Forum Jump:


Users browsing this thread: 1 Guest(s)