[HELP] Destroying Cars
#3

You're trying to destroy the vehicles for the player that are stored in CarVIP and caradm? And only if they are in one or the other? If so, something like this should do the trick:
pawn Код:
stock ResetCars( playerid )
{
   if( IsPlayerInVehicle( playerid, CarVIP[ playerid ] ) || IsPlayerInVehicle( playerid, caradm[ playerid ] ) )
   {
      DestroyVehicle( CarVIP[ playerid ] );
      DestroyVehicle( caradm[ playerid ] );
   }
}
However, if you're trying to destroy whichever the player is ine:
pawn Код:
stock ResetCars( playerid )
{
   if( IsPlayerInVehicle( playerid, CarVIP[ playerid ] ) )
   {
      DestroyVehicle( CarVIP[ playerid ] );
   }
   else if( IsPlayerInVehicle( playerid, caradm[ playerid ] ) )
   {
      DestroyVehicle( caradm[ playerid ] );
   }
}
Please explain more thoroughly what you're trying to accomplish.
Reply


Messages In This Thread
[HELP] Destroying Cars - by [AF]Junior - 07.08.2011, 01:03
AW: [HELP] Destroying Cars - by Nero_3D - 07.08.2011, 01:18
Re: [HELP] Destroying Cars - by Grim_ - 07.08.2011, 01:19
Re: [HELP] Destroying Cars - by [AF]Junior - 07.08.2011, 01:26
Re: [HELP] Destroying Cars - by dowster - 07.08.2011, 03:10
Re: [HELP] Destroying Cars - by [AF]Junior - 07.08.2011, 03:27
Re: [HELP] Destroying Cars - by MadeMan - 07.08.2011, 08:36

Forum Jump:


Users browsing this thread: 1 Guest(s)