Squirrel/Server/Functions/Vehicles/PassengerCount
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|Vehicle.PassengerCount}} This ''Vehicle'' class member returns the passenger count of the vehicle. == Syntax == <code>int Vehicle.PassengerCount</code> == Arg…') |
(→Example) |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | |||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onPlayerCommand( pPlayer, szCommand, szText ) | |
+ | { | ||
+ | if ( szCommand == "passengers" ) | ||
+ | { | ||
+ | if ( pPlayer.Vehicle ) MessagePlayer( "Vehicle passenger count is " + pPlayer.Vehicle.PassengerCount, pPlayer ); | ||
+ | } | ||
+ | |||
+ | return 1; | ||
+ | } | ||
</code> | </code> | ||
Revision as of 17:29, 29 September 2010
This Vehicle class member returns the passenger count of the vehicle.
Syntax
int Vehicle.PassengerCount
Arguments
- none
Example
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "passengers" ) { if ( pPlayer.Vehicle ) MessagePlayer( "Vehicle passenger count is " + pPlayer.Vehicle.PassengerCount, pPlayer ); } return 1; }
Notes
Example notes and used functions here.
Related Functions
- CreateVehicle
- FindVehicle
- GetClosestVehicle
- GetVehicleCount
- GetVehicleHandlingData
- GetVehicleIDFromName
- GetVehicleName
- SetVehicleHandlingData
- Vehicle.Alpha
- Vehicle.Angle
- Vehicle.Colour1
- Vehicle.Colour2
- Vehicle.Driver
- Vehicle.EngineDamage
- Vehicle.Explode
- Vehicle.Fix
- Vehicle.GetAddon
- Vehicle.GetPassenger
- Vehicle.GetHandlingData
- Vehicle.GetWheelStatus
- Vehicle.Health
- Vehicle.ID
- Vehicle.IdleRespawnTime
- Vehicle.IdleTime
- Vehicle.LightState
- Vehicle.Locked
- Vehicle.Marker
- Vehicle.MarkerScale
- Vehicle.MarkerSprite
- Vehicle.Model
- Vehicle.OneTime
- Vehicle.PassengerCount
- Vehicle.Pos
- Vehicle.Remove
- Vehicle.Respawn
- Vehicle.RespawnTime
- Vehicle.RGBColour1
- Vehicle.RGBColour2
- Vehicle.SetHandlingData
- Vehicle.SetWheelStatus
- Vehicle.SpawnAngle
- Vehicle.SpawnPos
- Vehicle.SetAddon
- Vehicle.SetEngineState
- Vehicle.SetRadio
- Vehicle.Siren
- Vehicle.SirenLight
- Vehicle.TaxiLight
- Vehicle.Velocity
- Vehicle.VirtualWorld
- Vehicle.Wrecked