Help Get vehicle size

ZaaxHash

Member
Joined
Jun 4, 2019
Messages
20
Solutions
1
Reaction score
2
How I get the vehicles size in Cleo?
like pawn:
Code:
GetVehicleModelInfo(411, VEHICLE_MODEL_INFO_SIZE, X, Y, Z); //output infernus size: X: 2.39 Y: 5.78 Z: 1.37
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,732
Solutions
2
Reaction score
117
How I get the vehicles size in Cleo?
like pawn:
Code:
GetVehicleModelInfo(411, VEHICLE_MODEL_INFO_SIZE, X, Y, Z); //output infernus size: X: 2.39 Y: 5.78 Z: 1.37
Code:
07E4: get_model 4@ dimensions_cornerA_to $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 dimensions_cornerB_to 7@ 8@ 9@
Used in this CLEO as an example. So I believe the CornerA/CornerB is given as offsets from the models centre (0.0,0.0,0.0) so CornerA will be given as -X,-Y,-Z and CornerB given as X,Y,Z so to get the overall dimensions you just need to turn negative values positive and add them together. This code didn't give exact values as what you put but they were pretty close so... CLEO>PAWN ??
Code:
:DIMENSION // call @DIMENSION 1 0@ _MODEL XYZ_ 0@ 1@ 2@
07E4: get_model 0@ dimensions_cornerA_to 0@ 1@ 2@ dimensions_cornerB_to 3@ 4@ 5@
0097: make 0@ absolute_float
0097: make 1@ absolute_float
0097: make 2@ absolute_float
005B: 0@ += 3@ 
005B: 1@ += 4@ 
005B: 2@ += 5@ 
0AB2: 3 0@ 1@ 2@
 
Top