Player loop doesnt work!
#1

pawn Код:
public CWMessage(playerid)
{
    if(team1K == CwInfo[kill_limiter])
    {
        new string[64];
        format(string, sizeof(string),"* Team 1 Have Won With %i Kills! Team 2 had %i Kills.", team1K, team2K);
        SendClientMessageToAll(COLOR_ORANGE,string);
        SendClientMessageToAll(COLOR_ORANGE,"* The Kills for both teams have been reset automatically.");
        team1K = 0;
        team2K = 0;
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(PlayerInfo[i][pCW] > 0)
            {
                TogglePlayerControllable(i, 0);
                SetTimer("Control", 7000, false);
                format(team1kills, sizeof(team1kills), "Team 1: %i / %i",team1K,CwInfo[kill_limiter]);
                format(team2kills, sizeof(team2kills), "Team 2: %i / %i",team2K,CwInfo[kill_limiter]);
                TextDrawSetString(TextdrawCW, team1kills);
                TextDrawSetString(TextdrawCW2, team2kills);
                TextDrawShowForPlayer(i, TextdrawCW);
                TextDrawShowForPlayer(i, TextdrawCW2);
            }
        }
    }
}
It's only freezing team 1!
Reply
#2

pawn Код:
// how about this?
 if(team1K == CwInfo[kill_limiter])
Reply
#3

That's exactly what i have..
Reply
#4

pawn Код:
SetTimer("Control", 7000, false);
I suppose that should be SetTimerEx? Doesn't make much sense starting a bunch of timers in a loop.
Reply
#5

Made some changes and now it doesnt freeze anyone..
Reply
#6

Your code is quite confused, why don't post here the others functions that are interlinked with that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)