Car "if" help
#1

what the if for if some one in the car it does not detele and if no some is in there then it does not delete
Reply
#2

Excuse me?
Reply
#3

Complete shot in the dark, but...

pawn Код:
forward DeleteCars();
public DeleteCars()
{
  new usedcars[MAX_VEHICLES];
  for(new playerid;playerid<MAX_PLAYERS;playerid++)
  {
    if( IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid) )usedcars[GetPlayerVehicleID(playerid)-1] = 1;
  }
  for(new vehicleid;vehicleid<MAX_VEHICLES;playerid++)
  {
    if( !usedcars[vehicleid] )DestroyVehicle(vehicleid);
  }
}
Reply
#4

thanks but where would i add this

Код:
DestroyVehicle(TmpVehicle[playerid]);
if theres no one in the car
Reply
#5

Any know where to put it please

Код:
DestroyVehicle(TmpVehicle[playerid]);
Reply
#6

i would guess put it over DEstroyVehicle(vehicleid) but i sent you one that was perfectly good for this...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)