Id vehicle
#3

Try this:

PHP код:
TennIdCreated()
{
    new 
smallid 20// 20 vehicles created
    
for(new vid 1vid 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;

Reply


Messages In This Thread
Id vehicle - by Mister0 - 08.10.2015, 12:24
Re: Id vehicle - by AbyssMorgan - 08.10.2015, 13:46
Re: Id vehicle - by d3ll - 08.10.2015, 13:53
Re: Id vehicle - by Sew_Sumi - 08.10.2015, 14:23

Forum Jump:


Users browsing this thread: 2 Guest(s)