02.05.2012, 16:34
There are two closing braces in your code , which are not necessary. Try this one
pawn Код:
//First closing brace was over here.
forward UpdateEvent();
public UpdateEvent()
{
new i;
new string[128];
if(gPizzaTime[i] == 0 && gPizzaMins[i] == 0 && gPizzaBoy[i] > 0)
{
DisablePlayerCheckpoint(i);
GameTextForPlayer(i,"~r~Pizza boy mission failed~n~~y~You ran out of time!",5000,5);
gPizzaTime[i] = 0;
gPizzaBoy[i] = 0;
gPizzaPoint[i] = 0;
gPizzas[i] = 0;
gPizzaMins[i] = 0;
}
if(gPizzaTime[i] > 0)
{
gPizzaTime[i] --;
if(gPizzaTime[i] <= 10 && gPizzaMins[i] == 0)
{
format(string,sizeof(string),"~n~~n~~n~~n~~n~~y~Time Left: ~n~~r~%d Mins %d Secs",gPizzaMins[i],gPizzaTime[i]);
PlayerPlaySound(i, 1138, 0.0, 0.0, 0.0);
}
else
{
format(string,sizeof(string),"~n~~n~~n~~n~~n~~y~Time Left: ~n~~w~%d Mins %d Secs",gPizzaMins[i],gPizzaTime[i]);
}
GameTextForPlayer(i,string,5000,5);
}
if(gPizzaTime[i] == 0 && gPizzaBoy[i] > 0 && gPizzaMins[i] != 0)
{
gPizzaMins[i] --;
gPizzaTime[i] = 60;
}
if(gPizzaTime[i] > 60 && gPizzaBoy[i] > 0)
{
new time = gPizzaTime[i];
gPizzaMins[i] ++;
if(time > 60 && time < 70) gPizzaTime[i] = time-60;
else gPizzaTime[i] = time-70;
}// One was here so removed it.
}
return 1;
}