19.01.2011, 19:45
Hello, I need some help. How can I make cars that i spawn disapear whe a player spawns anothere one?
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);
}
}
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);
}
}