Get all spawned cars
#1

Hi i just need that piece of script that does like

Код:
..../command...
{
get all vehicles that are spawned
-do something with them-
.......
I dont need the piece of /command, just that with vehs

Thanks
Reply
#2

What do you want to do with them?
Respawn them?
Reply
#3

Quote:
Originally Posted by MenaceX^
What do you want to do with them?
Respawn them?
No, refuel with command: VehicleGas[c] = MAX_GAS;
Reply
#4

pawn Код:
if(strcmp(cmdtext,"/command",true) == 0)
{
  for(new v; v < MAX_VEHICLES; v++)
  {
    VehicleGas[v] = MAX_GAS;
  }
  return 1;
}
Reply
#5

pawn Код:
new cmd[128];
if(!strcmp(cmd,"/command",true))
{
  for(new v=1;v<MAX_VEHICLES;v++) // loop for all the vehicles.
    VehicleGas[v]=MAX_GAS;
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)