Dafuq.. how to fix this, booleans?
#1

Hey guys.. it's again me, and i have same prob as in my first post..
In this code i wanted to make that if boolean = true timers start and other thing..
And if boolean = false you get the error message, i don't know why but in game when the boolean is true, you get all 2 things.. not all but ClientMassage to all ye, so i get like
"Steezy started the rocket countdown
Please wait, the rocket is reloading.."
Help please E_E

Код:
new bool:reloading = false;


public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/launch", cmdtext, true, 10) == 0)
{
     if(reloading)
     {
          SendClientMessage(playerid, COLOR_LIGHTBLUE, "The cannon is reloading.. please wait.");
     }
     else
     {
          SetTimer("reload", 120000, 0);
          SetTimer("fifteen", 1000, 0);
          SetTimer("ten", 5000, 0);
          SetTimer("five", 10000, 0);
          SetTimer("four", 11000, 0);
          SetTimer("three", 12000, 0);
          SetTimer("two", 13000, 0);
          SetTimer("one", 14000, 0);
          SetTimer("start", 15000, 0);
	}
	GetPlayerName(playerid, pName, 30);
	format(string, 280, "{00CDCD}%s {00FFFF}started the rocket countdown.", pName);
	SendClientMessageToAll(COLOR_LIGHTBLUE, string);
	return 1;
}
Reply
#2

What is that system your developing, i don't understand what your trying to ask!
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
Because the messages are not covered by the condition. This is why indentation is important.
Kkaaai, thanks, i've fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)