05.01.2015, 16:31
Quote:
|
Hi, i have this code:
Код:
#define SLOTY 50
forward FotoradarUpdate();
public FotoradarUpdate()
{
for(new i = 0;i<SLOTY;i++)
{
if(!IsPlayerConnected(i)) break;
if(!IsPlayerInAnyVehicle(i)) break;
for(new b = 0;b<MAX_FOTORADARY +1;b++)
{
if(IsPlayerInRangeOfPoint(i,FotoInfo[b][Range],FotoInfo[b][posX],FotoInfo[b][posY],FotoInfo[b][posZ]))
{
if(GetVehicleSpeed(GetPlayerVehicleID(i)) > FotoInfo[b][vMax])
{
SendClientMessage(i, COLOR_RED, "Przekroczyłeś prędkość");
ShowPlayerFadeScreenToBlank(i, 15, 255, 255, 255, 200);
}
format(dstring,sizeof(dstring),"[INFO] Jesteś blisko radaru UID:"CWHITE" %d!",FotoInfo[b][UID]);
SendClientMessage(i, COLOR_YELLOW, dstring);
}
}
}
return 1;
}
|
Break entirely stops the loop and continue essentially just skips the iteration and it moves on to the next. You can read more about break and continue here... https://sampwiki.blast.hk/wiki/Control_Structures#break https://sampwiki.blast.hk/wiki/Control_Structures#continue


