- Documentation
- Server functions
- setModelMaxPassengers
Function
setModelMaxPassengers
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
getModelMaxPassengersReturns a model's number of passenger seats after applying the limit fromsetModelMaxPassengers.getVehicleMaxPassengersReturns the number of passenger seats of a vehicle or model (not counting the driver): e.g. 1 for a two-seater, 3 for a saloon. The data comes from the game, so the server only knows it once a client reports it (usually after the model first appears for a player); before that it returnsfalse.