ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isValidVehicleModel

Function

isValidVehicleModel

Server and clientVehiclesTrilogy Hub only

Checks whether a number is a vehicle model: 400-611 from the game or a new vehicle registered with engineRequestModel.

Syntax

bool isValidVehicleModel(int model)

Arguments

modelint
The number to check.

Returns

true for a vehicle model.

Example

addCommandHandler("model", function(player, _, id)
    id = tonumber(id)
    if not id or not isValidVehicleModel(id) then
        return outputChatBox("Zly numer pojazdu.", player)
    end
end)

See also