GetVehicleModelInfo

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:36, 24 March 2013
Meta (Talk | contribs)
(RelatedFunctions)
← Previous diff
Revision as of 17:34, 31 March 2016
ZiGGi (Talk | contribs)

Next diff →
Line 9: Line 9:
{{Param|vehiclemodel|The [[Vehicles:All|vehicle model]] to get info of.}} {{Param|vehiclemodel|The [[Vehicles:All|vehicle model]] to get info of.}}
{{Param|infotype|The [[vehicle information types|type]] of information to retrieve.}} {{Param|infotype|The [[vehicle information types|type]] of information to retrieve.}}
-{{Param|Float:X|A float to store the X value.}}+{{Param|&Float:X|A float to store the X value.}}
-{{Param|Float:Y|A float to store the Y value.}}+{{Param|&Float:Y|A float to store the Y value.}}
-{{Param|Float:Z|A float to store the Z value.}}+{{Param|&Float:Z|A float to store the Z value.}}
{{NoReturn}} {{NoReturn}}

Revision as of 17:34, 31 March 2016



GetVehicleModelInfo was added in SA-MP 0.3e This function was added in SA-MP 0.3e and will not work in earlier versions!


Description:

Retrieve information about a specific vehicle model such as the size or position of seats


Parameters:
(vehiclemodel, infotype, Float:X, Float:Y, Float:Z)
vehiclemodelThe vehicle model to get info of.
infotypeThe type of information to retrieve.
&Float:XA float to store the X value.
&Float:YA float to store the Y value.
&Float:ZA float to store the Z value.


Return Values:

This function does not return any specific values.


new Float:X, Float:Y, Float:Z;
GetVehicleModelInfo(411, VEHICLE_MODEL_INFO_SIZE, X, Y, Z); //Get the size of vehicle model 411 (Infernus)
printf("The infernus is %.1fm wide, %.1fm long and %.1fm high", X, Y, Z);
//Prints "The infernus is 2.3m wide, 5.7m long and 1.3m high" into the console

Related Functions

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

Personal tools
In other languages