GetVehicleMaxPassengers: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 4: Line 4:


==Syntax==
==Syntax==
  int getVehicleMaxPassengers ([[vehicle]] vehicle)
  int [[getVehicleMaxPassengers]] ([[vehicle]] vehicle)


==Required Arguments==
==Required Arguments==
*[[vehicle]]: A handle to the vehicle that you wish to know the maximum capacity of.
*vehicle: A handle to the [[vehicle]] that you wish to know the maximum capacity of.


==Example==
==Example==
  newcar = [[createVehicle]] ( 520, 1024, 1024, 1024 )
newcar = [[createVehicle]] ( 520, 1024, 1024, 1024 )
  maxseats = [[getVehicleMaxPassengers]] ( newcar )
maxseats = [[getVehicleMaxPassengers]] ( newcar )
   
  [[serverChat]] ( "This vehicle supports ", maxseats, " passengers." )
  [[serverChat]] ( "This vehicle supports ", maxseats, " passengers." )

Revision as of 09:56, 30 March 2006

Description

This function returns the maximum number of passengers that a specified vehicle can hold.

Syntax

int getVehicleMaxPassengers (vehicle vehicle)

Required Arguments

  • vehicle: A handle to the vehicle that you wish to know the maximum capacity of.

Example

newcar = createVehicle ( 520, 1024, 1024, 1024 )
maxseats = getVehicleMaxPassengers ( newcar )
serverChat ( "This vehicle supports ", maxseats, " passengers." )