08.10.2015, 13:53
Try this:
PHP код:
TennIdCreated()
{
new smallid = 20; // 20 vehicles created
for(new vid = 1; vid < sizeof(CreatedCarsOn); vid++) // there is no vehicle ID 0 in SA-MP, starts from 1.
{
if(CreatedCarsOn[vid] != INVALID_VEHICLE_ID) // created vehicle
{
if(CreatedCarsOn[vid] > smallid) continue; // vehicle ID is larger than the smallid, skip it.
smallid = CreatedCarsOn[vid];
}
else continue;
}
return smallid;
}