09.04.2012, 13:33
Im checking through available slots (ADMV1)
as soon as 1 is available how can I stop checking through the overs?
because they all could be set to 0, so if it finds ADMV1 as 0, it can stop there and not check ADMV2
I cant use return 1;
as I have code after the checks and it will not get reached.
as soon as 1 is available how can I stop checking through the overs?
because they all could be set to 0, so if it finds ADMV1 as 0, it can stop there and not check ADMV2
pawn Код:
if(dini_Int(SettingsFile,"ADMV1") == 0)
{
dini_IntSet(SettingsFile,"ADMV1",PlayerInfo[playerid][pCarSel]);
FacCar2 = 1;
}
if(dini_Int(SettingsFile,"ADMV2") == 0)
{
dini_IntSet(SettingsFile,"ADMV2",PlayerInfo[playerid][pCarSel]);
FacCar2 = 2;
}
if(dini_Int(SettingsFile,"ADMV3") == 0)
{
dini_IntSet(SettingsFile,"ADMV3",PlayerInfo[playerid][pCarSel]);
FacCar2 = 3;
}
if(dini_Int(SettingsFile,"ADMV4") == 0)
{
dini_IntSet(SettingsFile,"ADMV4",PlayerInfo[playerid][pCarSel]);
FacCar2 = 4;
}
as I have code after the checks and it will not get reached.