13.05.2011, 19:27
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;
}