Quote:
Originally Posted by PowerPC603
Код:
new bool:VehiclesByVCommand[2000];
// In your /v command use:
VehiclesByVCommand[vehicleid] = true;
After that, you could have a command that destroys all vehicles created by /v.
Just loop through all vehicles (from 1 to 1999) and check if the VehicleByVCommand is set to "true".
If it's "true", destroy the vehicle and set this variable back to "false" (to prevent trying to destroy the vehicle again if the command is used again afterwards).
If it's false, do nothing.
|
Why are you using
2000 instead of
MAX_VEHICLES? I know
MAX_VEHICLES is equals to
2000, but sometimes scripters does not use all of it, so they do is
re-define MAX_VEHICLES and change its size, I'm not insulting you in anyway it's just my opinion that using
MAX_VEHICLES is much better so if you loop
VehiclesByVCommand using (sizeof VehiclesByVCommand) of course, the loop will continue until
2000 instead of the new size you just
redefined.