- Documentation
- Server functions
- setVehicleMaxPassengers
Function
setVehicleMaxPassengers
Stores a model's number of passenger seats on the server. The game client usually does this automatically; a script can provide it earlier so getVehicleMaxPassengers knows it from the start.
Syntax
bool setVehicleMaxPassengers(int model, int count)Arguments
modelint- Vehicle model ID.
countint- Number of passenger seats.
Returns
true on success.
Example
setVehicleMaxPassengers(411, 1)
See also
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.setModelMaxPassengersLimits a model's passenger seats: players cannot get into seats with a higher number (the server cancels entering). Also works for new models fromengineRequestModel. You cannot add seats the base model does not have.nilorfalseremoves the limit.