[Include] Vehicle Handling
#1

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.
Reply
#2

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
Reply
#3

This is nice
Reply
#4

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
Reply
#5

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

But this is still nice.
Reply
#6

This Nice...
Reply
#7

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
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)