GetBoatVehicleModelAgility
Docslocal retval = GetBoatVehicleModelAgility(modelHash)Description
Introduced in build 323
Retrieves the agility for a specific boat model, including any vehicle mods. Unlike other vehicles where Rockstar Games typically assess performance based on traction, boats use agility as a measure. This static value is distinct from the traction metrics used for other vehicle types.
Parameters
| Name | Type | Description |
|---|---|---|
modelHash | Hash | The model hash of the boat. |
Quick Snippet: Load Model HashmodelHash
modelHashModels must be loaded before use. This snippet handles requesting and releasing properly.
-- Properly load a model before spawning/using it
local modelName = "prop_barrel_01a" -- change to your model
local modelHash = GetHashKey(modelName)
RequestModel(modelHash)
while not HasModelLoaded(modelHash) do
Wait(0)
end
print("Model loaded: " .. modelName .. " (" .. modelHash .. ")")
-- Release when done:
-- SetModelAsNoLongerNeeded(modelHash)Vehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
floatReturns a floating-point number.
Examples
Official
-- This example prints the agility of the player's current boat.
-- Retrieve the player ped.
local playerPed = PlayerPedId()
-- Retrieve the vehicle the player is currently in.
local vehicle = GetVehiclePedIsIn(playerPed, false)
-- Retrieve the model hash of the boat.
local boatHash = GetEntityModel(vehicle)
-- If the vehicle does not exist or is not a boat, end the execution of the code here.
if not DoesEntityExist(vehicle) or not IsThisModelABoat(boatHash) then
return
end
-- Retrieve the agility of the boat.
local agility = GetBoatVehicleModelAgility(boatHash)
-- Print the agility of the boat.
print("Boat Agility: " .. agility)