SA-MP Forums Archive
[Include] Vehicle Handling - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Vehicle Handling (/showthread.php?tid=514071)



Vehicle Handling - Hesse - 19.05.2014

Hi there!

Today, for the first time in this forum publish any thing.

1. What is it?
It is a library that contains the data of the original vehicle handling from GTA SA.
We can download the vehicle weight, number of gears, the mass center of the vehicle, maximum speed, acceleration, Intertia, engine type, drive type, etc...

2. What are the Functions:
Код:
-- Functions return a floating-point number
native Float:GetVehicleMass(vehicle);
native Float:GetVehicleDragCoeff(vehicle);
native Float:GetVehicleFrontRearBias(vehicle);
native GetVehicleCenterMass(vehicle, &Float:cx, &Float:cy, &Float:cz);
native Float:GetVehicleSusAntiDriveMul(vehicle);
native Float:GetVehicleSusHighSpeedDpg(vehicle);
native Float:GetVehicleSusLowerLimit(vehicle);
native Float:GetVehicleSusUpperLimit(vehicle)
native Float:GetVehicleSusForceLvl(vehicle);
native Float:GetVehicleSteeringLock(vehicle);
native Float:GetVehicleTurnMass(vehicle);
native Float:GetVehicleTractionMultiplier(vehicle);
native Float:GetVehicleEngineAccel(vehicle);
native Float:GetVehicleEngineInertia(vehicle);
native Float:GetVehicleTractionBias(vehicle);
native Float:GetVehicleTractionLoss(vehicle);
native Float:GetVehicleTractionLoss(vehicle);
native Float:GetVehicleDistSeatOffset(vehicle);
native Float:GetVehicleSusDamping(vehicle);
native Float:GetVehicleCollisionDmg(vehicle);
native Float:GetVehicleMaxVelocity(vehicle);
-- Functions returning an integer
native GetVehicleNumberOfGear(vehicle);
native GetVehiclePercentSubMerged(vehicle);
-- Functions return a string
native GetVehicleEngineType(vehicle); 
native GetVehicleDriveType(vehicle);
Currently, these functions can only return through vehicleid. In the future implementation of the right of appeal is also using the same vehicle model.

URL to source: https://github.com/l0nger/SAMP-Handling
Download library: https://github.com/l0nger/SAMP-Handl...ive/master.zip
License: GPLv2

Peace.


Re: Vehicle Handling - Derryd - 20.05.2014

GetVehicleDriveType returns the first letter of the drive type, for example - A for AWD or R for RWD, then the command I last typed.

Any ideas? Don't know how this could happen


Re: Vehicle Handling - Mriss - 20.05.2014

This is nice


Re: Vehicle Handling - Hesse - 20.05.2014

Quote:
Originally Posted by Derryd
Посмотреть сообщение
GetVehicleDriveType returns the first letter of the drive type, for example - A for AWD or R for RWD, then the command I last typed.

Any ideas? Don't know how this could happen
Well, actually there is an error with returning a strings.

Download it again, now it should not be a problem.
And one more thing, assing the string as follows:
Код:
new buf[5];
strcat(buf, GetVehicleDriveType(vehicleid));
printf("blabala: %s", buf); - it work's



Re: Vehicle Handling - Kyle - 20.05.2014

Vince did something similar before you: https://sampforum.blast.hk/showthread.php?tid=438678

But this is still nice.


Re: Vehicle Handling - Shevil - 07.07.2014

This Nice...


Re: Vehicle Handling - startserv - 02.10.2014

Plis help!
compile pawno


PHP код:
C:\Users\âèí7\Desktop\United\pawno\include\handling.inc(384) : error 010: invalid function or declaration
C:\Users\âèí7\Desktop\United\pawno\include\handling.inc(387) : error 001: expected token: "-identifier-", but found "("
C:\Users\âèí7\Desktop\United\pawno\include\handling.inc(389) : error 010: invalid function or declaration
C:\Users\âèí7\Desktop\United\pawno\include\handling.inc(392) : error 001: expected token: "-identifier-", but found "("
C:\Users\âèí7\Desktop\United\pawno\include\handling.inc(394) : error 010: invalid function or declaration
C:\Users\âèí7\Desktop\United\pawno\include\handling.inc(398) : error 010: invalid function or declaration 
what is problem? pliss help


Re: Vehicle Handling - Rudy_ - 02.10.2014

We can't set them? :/
Still awesome job.