11.06.2012, 09:45
Hello, I have a problem, first of all, the code:
public OnPlayerCommandText(playerid, cmdtext[])
{
for(new blue = 0; blue < 500; blue++)
{
new Text:blsk;
new string [50];
format(string, sizeof string, "blue %d", blue);
TextDrawSetString(blsk, string);
{
if (strcmp("/blue", cmdtext, true, 10) == 0)
{
if (GetPlayerTeam(playerid) == 0)
{
blue = blue + 1;
SetPlayerTeam(playerid, 1);
SendClientMessage(playerid, 0x33aa33aa, "Dabar tu blue teame");
}
if (GetPlayerTeam(playerid) == 1)
{
SendClientMessage(playerid, 0x33aa33aa, "tu jau esi ten");
return 1;
}
}
}
}
return 0;
}
and after using this command, server shows a textdraw which counts till 500, meanwhile I need only to plus 1. What's the problem?
public OnPlayerCommandText(playerid, cmdtext[])
{
for(new blue = 0; blue < 500; blue++)
{
new Text:blsk;
new string [50];
format(string, sizeof string, "blue %d", blue);
TextDrawSetString(blsk, string);
{
if (strcmp("/blue", cmdtext, true, 10) == 0)
{
if (GetPlayerTeam(playerid) == 0)
{
blue = blue + 1;
SetPlayerTeam(playerid, 1);
SendClientMessage(playerid, 0x33aa33aa, "Dabar tu blue teame");
}
if (GetPlayerTeam(playerid) == 1)
{
SendClientMessage(playerid, 0x33aa33aa, "tu jau esi ten");
return 1;
}
}
}
}
return 0;
}
and after using this command, server shows a textdraw which counts till 500, meanwhile I need only to plus 1. What's the problem?