Detecting a /v car.
#6

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.
MAX_VEHICLES is defined as 2000 so why not to use all of them (slots/indexes) but only 1999? I don't see any point of leaving the index 0 unused.

pawn Код:
// In your /v command use:
VehiclesByVCommand[vehicleid - 1] = true;
Reply


Messages In This Thread
Detecting a /v car. - by DaniceMcHarley - 06.01.2014, 15:42
Re: Detecting a /v car. - by PowerPC603 - 06.01.2014, 16:01
Re: Detecting a /v car. - by sammp - 06.01.2014, 16:05
Re: Detecting a /v car. - by sammp - 06.01.2014, 16:24
Re: Detecting a /v car. - by Patrick - 06.01.2014, 16:29
Re: Detecting a /v car. - by Konstantinos - 06.01.2014, 16:34
Re: Detecting a /v car. - by DaniceMcHarley - 06.01.2014, 17:39
Re: Detecting a /v car. - by PowerPC603 - 07.01.2014, 12:58
Re: Detecting a /v car. - by Konstantinos - 07.01.2014, 15:08
Re: Detecting a /v car. - by PowerPC603 - 07.01.2014, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)