Dafuq.. how to fix this, booleans? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dafuq.. how to fix this, booleans? (
/showthread.php?tid=448523)
Dafuq.. how to fix this, booleans? -
Steezy_ - 04.07.2013
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;
}
Re: Dafuq.. how to fix this, booleans? -
Savesoulz - 04.07.2013
What is that system your developing, i don't understand what your trying to ask!
Re: Dafuq.. how to fix this, booleans? -
Steezy_ - 04.07.2013
Quote:
Originally Posted by ******
Because the messages are not covered by the condition. This is why indentation is important.
|
Kkaaai, thanks, i've fixed