07.08.2011, 01:19
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:
However, if you're trying to destroy whichever the player is ine:
Please explain more thoroughly what you're trying to accomplish.
pawn Код:
stock ResetCars( playerid )
{
if( IsPlayerInVehicle( playerid, CarVIP[ playerid ] ) || IsPlayerInVehicle( playerid, caradm[ playerid ] ) )
{
DestroyVehicle( CarVIP[ playerid ] );
DestroyVehicle( caradm[ playerid ] );
}
}
pawn Код:
stock ResetCars( playerid )
{
if( IsPlayerInVehicle( playerid, CarVIP[ playerid ] ) )
{
DestroyVehicle( CarVIP[ playerid ] );
}
else if( IsPlayerInVehicle( playerid, caradm[ playerid ] ) )
{
DestroyVehicle( caradm[ playerid ] );
}
}