04.07.2013, 16:05
Hey guys, first of all i would say sorry for my poor english.. but ok, i have i prob in my code..
I wanted to make that if you use /launch when the boolean is true, playerid gets an error.. the compiler don't give errors but in game when i do that, i get the error.. but the real function too
Someone told me that i've forgot a bracket but i don't see where..
Here is my code
I wanted to make that if you use /launch when the boolean is true, playerid gets an error.. the compiler don't give errors but in game when i do that, i get the error.. but the real function too
Someone told me that i've forgot a bracket but i don't see where..
Here is my code
Код:
new bool: reloading; public reload() { GameTextForAll("The cannon has been reloaded.",2000,4); SetObjectPos(obj , 268.89999389648, 1884, 9); reloading = false; return 1; } public fifteen() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i, 500.0, 268.89999389648, 1884, 9)) GameTextForPlayer(i ,"~r~15 secs until launch",2000,4); if(IsPlayerInRangeOfPoint(i, 500.0, 268.89999389648, 1884, 9)) PlayerPlaySound(i , 3200, 0.0, 0.0, 0.0); reloading = true; } return 1; } if (strcmp("/launch", cmdtext, true, 10) == 0){ if(reloading == true) 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 cannon countdown.", pName); SendClientMessageToAll(COLOR_LIGHTBLUE, string); } return 1; }