A loop is blocking my code.
#1

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;
}
Now this loop is my problem , if i put it on the top of the callback the loop gets called but the rest of the callback is not called if i put the loop at the bottom of my callback it doesn't get called also tried adding and removing return 1; but still
Any help please?
Reply


Messages In This Thread
A loop is blocking my code. - by CoDeZ - 28.08.2012, 19:31
Re: A loop is blocking my code. - by RenSoprano - 28.08.2012, 19:38
Re: A loop is blocking my code. - by CoDeZ - 28.08.2012, 19:41
Re: A loop is blocking my code. - by iTorran - 28.08.2012, 19:48
Re: A loop is blocking my code. - by CoDeZ - 28.08.2012, 19:56
Re: A loop is blocking my code. - by leonardo1434 - 28.08.2012, 20:13
Re: A loop is blocking my code. - by CoDeZ - 28.08.2012, 20:42

Forum Jump:


Users browsing this thread: 1 Guest(s)