GetVehiclePoolSize

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 19:39, 28 February 2015


This function was added in SA-MP 0.3.7 RC2 and will not work in earlier versions!


Description:

Gets the highest vehicleid currently in use on the server.


Parameters:
This function has no parameters.


Return Values:

The highest vehicleid currently in use on the server.


Example Usage:

RepairAllVehicles()
{
    for(new i = 1, j = GetVehiclePoolSize(); i <= j && j != 0; i++) // verify that j (the pool size) is not 0 to avoid a potential infinite loop in case there are no vehicles
    {
        RepairVehicle(i);
    }
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.