How To Make People Spawn On Different Position?
#4

pawn Код:
new Float:RandomCopSpawn[][4] =
{
    //The X, Y, Z, FaceAngle coords
    {-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
};

new Float:RandomTerroristSpawn[][4] =
{
    //The X, Y, Z, FaceAngle coords
    {-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
};

public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == TEAM_COP)
    {
        new RandomSpawn = random(sizeof(RandomCopSpawn));
        SetPlayerPos(playerid, RandomCopSpawn[RandomSpawn][0], RandomCopSpawn[RandomSpawn][1], RandomCopSpawn[RandomSpawn][2]);
        SetPlayerFacingAngle(playerid, RandomCopSpawn[RandomSpawn][3]);
    }
    else if(gTeam[playerid] == TEAM_TERRORIST)
    {
        new RandomSpawn = random(sizeof(RandomTerroristSpawn));
        SetPlayerPos(playerid, RandomTerroristSpawn[RandomSpawn][0], RandomTerroristSpawn[RandomSpawn][1], RandomTerroristSpawn[RandomSpawn][2]);
        SetPlayerFacingAngle(playerid, RandomTerroristSpawn[RandomSpawn][3]);
    }
    return 1;
}
Reply


Messages In This Thread
How To Make People Spawn On Different Position? - by Sid_Alexander - 13.05.2011, 19:13
Re: How To Make People Spawn On Different Position? - by Sasino97 - 13.05.2011, 19:19
Re: How To Make People Spawn On Different Position? - by Sid_Alexander - 13.05.2011, 19:21
Re: How To Make People Spawn On Different Position? - by Laronic - 13.05.2011, 19:27
Re: How To Make People Spawn On Different Position? - by Sid_Alexander - 13.05.2011, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)