GetVehiclePoolSize

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:56, 5 March 2015
Drebin (Talk | contribs)

← Previous diff
Current revision
OstGot (Talk | contribs)

Line 5: Line 5:
{{NoParam}} {{NoParam}}
-{{Returns|The highest vehicleid currently in use on the server.}}+{{Returns|The highest vehicleid currently in use on the server or '''0''' if there are no created vehicles.}}
{{Example}} {{Example}}

Current revision


GetVehiclePoolSize was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 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 or 0 if there are no created vehicles.


Example Usage:

RepairAllVehicles()
{
    for(new i = 1, j = GetVehiclePoolSize(); i <= j; i++) // vehicleids start at 1
    {
        RepairVehicle(i);
    }
}

Related Functions

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

Personal tools