-
Notifications
You must be signed in to change notification settings - Fork 3
Natives
Returns the type of the handling attribute, can be used for example when fetching data from a database, to know which function to call.
- Parameters
playerid
The id of the player- Returns
true
if player has the chandling plugin orfalse
if not
Checks if the player is capable of handling modifications. Although it should work already under OnPlayerConnect
, I don't advise using it that early (it should be okay though).
- Parameters
modelid
Vehicle model id- Returns
false
on failure or when model has no handling modifications,true
on success
Resets the handling for a particular model to it's defaults
- IMPORTANT: This also resets the handling for every vehicle of the same model, but not for those that have per-vehicle handling mods applied. These have their own copy of the handling and need to be reset manually.
- Parameters
vehicleid
ID of the vehicle- Returns
false
on failure or when vehicle has no handling modifications,true
on success
Resets the handling for a particular vehicle to it's current model handling (not the original handling!)
- Parameters
vehicleid
ID of the vehicleattribute
Handling attribute to setvalue
Value to set- Returns
false
on failure,true
on success
Sets a handling attribute of specified vehicle to a float value (use it only for attributes of TYPE_FLOAT)
- Parameters
vehicleid
ID of the vehicleattribute
Handling attribute to setvalue
Value to set- Returns
false
on failure,true
on success
Sets a handling attribute of specified vehicle to an integer value (use it only for attributes of TYPE_UINT, TYPE_FLAG and TYPE_BYTE)
- Parameters
vehicleid
ID of the vehicleattribute
Handling attribute to setresult
Variable in which the value will be stored- Returns
false
on failure,true
on success
Gets value of specified handling attribute and stores it in the result
variable
- Example:
new Float:val;
GetVehicleHandling(GetPlayerVehicleID(playerid), HANDL_FDRAGMULTIPLIER, val);
SetVehicleHandling(GetPlayerVehicleID(playerid), HANDL_FDRAGMULTIPLIER, val*0.98); // decrease the drag multiplier
- Parameters
vehicleid
ID of the vehicleattribute
Handling attribute to setresult
Variable in which the value will be stored- Returns
false
on failure,true
on success
Gets value of specified handling attribute and stores it in the result
variable
- See GetVehicleHandlingFloat for an example
- Parameters
modelid
The model IDattribute
Handling attribute to setvalue
The float value to set- Returns
false
on failure,true
on success
Sets a handling attribute of the specified model to a float value, use it only for attributes of type TYPE_FLOAT
The change wont affect vehicles that already have any handling modifications (SetVehicleHandling...), because they are using their own copy of the (previous) model handling. For that reason, SetModelHandling functions should be used only in OnGameModeInit.
- Parameters
modelid
The model IDattribute
Handling attribute to setvalue
The integer value to set- Returns
false
on failure,true
on success
Sets a handling attribute of the specified model to a integer value (use it only for attributes of TYPE_UINT, TYPE_FLAG and TYPE_BYTE)
The change wont affect vehicles that already have any handling modifications (SetVehicleHandling...), because they are using their own copy of the (previous) model handling. For that reason, SetModelHandling functions should be used only in OnGameModeInit.
- Parameters
modelid
The model IDattribute
Handling attribute to getresult
Variable in which the value will be stored- Returns
false
on failure,true
on success
Gets value of specified handling attribute from the model and stores it in the result
variable
- See GetVehicleHandlingFloat for an example
- Parameters
modelid
The model IDattribute
Handling attribute to getresult
Variable in which the value will be stored- Returns
false
on failure,true
on success
Gets value of specified handling attribute from the model and stores it in the result
variable
- See GetVehicleHandlingFloat for an example
- Parameters
modelid
The model IDattribute
Handling attribute to getresult
Variable in which the value will be stored- Returns
false
on failure,true
on success
Gets the original GTA value for specified handling attribute and stores it in the result
variable
- See GetVehicleHandlingFloat for an example
- Parameters
modelid
The model IDattribute
Handling attribute to getresult
Variable in which the value will be stored- Returns
false
on failure,true
on success
Gets the original GTA value for specified handling attribute and stores it in the result
variable
- See GetVehicleHandlingFloat for an example