Random Spawns for Teams
#1

fixed
Reply
#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
#3

its working thx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)