19.01.2011, 20:03
cough... this advice kinda fails...
you can use a variable..
"new spawned[MAX_VEHICLES]";
at the command:
you can use a variable..
"new spawned[MAX_VEHICLES]";
at the command:
pawn Код:
new v = CreateVehicle(............); //if you have another variable defined for the vehicleid you can use this ofc.
spawned[v] = 1;
for(new vid=0; vid<MAX_VEHICLES; vid++)
{
if(spawned[vid] == 1 && vid != v)
{
spawned[vid] = 0;
DestroyVehicle(vid);
}
}