28.08.2012, 19:31
pawn Код:
public OnPlayerSpawn(playerid);
{
TerrorsCounter=0;
CopsCounter=0;
if(Account[playerid][gTeam]==Cops)
{
print("Debug : Cops Random spawn called.");
new Random = random(sizeof(RandomSpawnsCops));
SetPlayerPos(playerid, RandomSpawnsCops[Random][0], RandomSpawnsCops[Random][1], RandomSpawnsCops[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawnsCops[Random][3]);
return 1;
}
else if(Account[playerid][gTeam]==Terrorists)
{
print("Debug : Teorrists Random spawn called.");
new Random = random(sizeof(RandomSpawnsTerrorists));
SetPlayerPos(playerid, RandomSpawnsTerrorists[Random][0], RandomSpawnsTerrorists[Random][1], RandomSpawnsTerrorists[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawnsTerrorists[Random][3]);
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Account[i][gTeam]==Terrorists) return TerrorsCounter++;
else if(Account[i][gTeam]==Cops) return CopsCounter++;
}
return 1;
}
Any help please?