[Help] string
#1

When fight is over i kill 3 times, he kill 4 times.

I am team blue [test2] and he is team red [test1] and i get message that i kill 3 times and he kill 4 times, but he get message that he kill 4 times, and I 0 time, where is problem?

pawn Код:
new string[128];
foreach(Player, u)
        {
            if(PlayerInfo[u][test1] == 1)
            {
                PlayerInfo[u][test1] = 0;
                SpawnPlayer(u);
                format(string, sizeof(string), "Test is stop by Admin %s, You: "#COL_WHITE"%d, "#COL_RED"Him: "#COL_WHITE"%d", PlayerName(playerid), red1, blue1);
                SendClientMessage(u, COLOR_RED, string);
            }
            else if(PlayerInfo[u][test2] == 1)
            {
                PlayerInfo[u][test2] = 0;
                SpawnPlayer(u);
                format(string, sizeof(string), "Test is stop by Admin %s, You: "#COL_WHITE"%d, "#COL_RED"Him: "#COL_WHITE"%d", PlayerName(playerid), blue1, red1);
                SendClientMessage(u, COLOR_RED, string);
                blue1 = 0;
                red1 = 0;
            }
        }
Reply
#2

at a glance I would say that maybe your variable is being reset somewhere. If his ID comes before yours, this will be the case. I think.

Try resetting them outside the foreach loop.
Reply
#3

I solved it,,, LOCK
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)