Home   Help Search Login Register  

Author Topic: counting soldiers in a vehicle  (Read 347 times)

0 Members and 1 Guest are viewing this topic.

gadolinite

  • Guest
counting soldiers in a vehicle
« on: 06 Nov 2004, 21:34:47 »
How to you assign the number of soldiers in a vehicle to a variable?

Offline Blanco

  • Former Staff
  • ****
Re:counting soldiers in a vehicle
« Reply #1 on: 06 Nov 2004, 21:54:43 »
there's the crew command which returns an array with all the units in a vehicle.

from the comref
Code: [Select]
crew vehicle
Operand types:
    vehicle: Object
Type of returned value:
    Array
Description:
    All units mounted in given vehicle. If vehicle is not vehicle, but person, list containing only person is returned.

Example:
    crew vehicle player

All you have to do than is count the crew


Code: [Select]
_number = count crew car1
« Last Edit: 06 Nov 2004, 21:55:05 by Blanco »
Search or search or search before you ask.