[HELP]Grouping cars for job
#5

Just add this function

Код:
stock IsInArray(item, groupArray[])
{
  for(new i=0; i<sizeof(groupArray); i++)
  {
    if(item==groupArray[i]) return 1;
  }
  return 0;
}
and replace
Код:
if(GetVehicleModel(vehicleid) == Taxis[10])
with
Код:
if(IsInArray(vehicleid, Taxis))

Or alternatively.
instead of an array of taxis, have each car have its group.
This depends on how you intend to use them, I think for you the first option is better.

enum VGroups
{
g_NOGROUP = 0,
g_TAXI,
g_GROUP2
}

new VehicleGroup[MAX_VEHICLES];

new vehicleid;
vehicleid = AddStaticVehicle(438,2107.1741,1396.9814,10.8259,3 59.2047,6,76);
VehicleGroup[vehicleid] = g_TAXI;


Reply


Messages In This Thread
[HELP]Grouping cars for job - by Zafire2008 - 26.01.2010, 01:59
Re: [HELP]Grouping cars for job - by Norn - 26.01.2010, 02:05
Re: [HELP]Grouping cars for job - by Zafire2008 - 26.01.2010, 02:23
Re: [HELP]Grouping cars for job - by Zafire2008 - 26.01.2010, 02:26
Re: [HELP]Grouping cars for job - by mansonh - 26.01.2010, 03:32

Forum Jump:


Users browsing this thread: 1 Guest(s)