SA-MP Forums Archive
Loop doesn't execute properly - 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: Loop doesn't execute properly (/showthread.php?tid=523333)



Loop doesn't execute properly - kamiliuxliuxliux - 01.07.2014

pawn Код:
for(new i = 1; i <= MAX_VEHICLES; i++)
    {
        if(IsValidVehicle(i))
        {
            if(IsSellCar(i))
            {
                SetVehicleNumberPlate(i, "___");
                SetVehicleToRespawn(i);
                strcpy(aInfo[i][veh_numplate], "___", 30);
                aInfo[i][nuosava] = 0;
                print("selling cars");
            }
            else if(IsMedCar(i))
            {
                new s[30];
                s = GenerateRandomVehicleNumPlate(i);
                strcpy(aInfo[i][veh_numplate], s, 30);
                aInfo[i][nuosava] = 0;
                print("med cars");
            }
            else if(IsVMCar(i))
            {
                new s[30];
            s = GenerateRandomVehicleNumPlate(i);
                strcpy(aInfo[i][veh_numplate], s, 30);
                aInfo[i][nuosava] = 0;
                print("vm cars");
            }
        }
    }

It stucks after 1st loop.



Re: Loop doesn't execute properly - kamiliuxliuxliux - 01.07.2014

Anyone?