ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setModelMaxPassengers

Function

setModelMaxPassengers

ServerVehiclesTrilogy Hub only

Limits a model's passenger seats: players cannot get into seats with a higher number (the server cancels entering). Also works for new models from engineRequestModel. You cannot add seats the base model does not have. nil or false removes the limit.

Syntax

bool setModelMaxPassengers(int model [, int count = nil])

Arguments

modelint
Vehicle model ID (400-611 or a new ID).
countint, optional = nil
Maximum passengers (0 = driver only); nil/false = no limit.

Returns

true on success.

Example

setModelMaxPassengers(596, 1)

See also