14.02.2012, 20:08
my destroyvehicle stock
pawn Код:
stock DestroyPVehicle(playerid, bool:destroycaralways = false)
{
if(carvar[playerid] == INVALID_VEHICLE_ID) return 0;
if(destroycaralways == true)
{
DestroyVehicle(carvar[playerid]);
}
else
{
if(!IsVehicleOccupied(carvar[playerid]))
{
DestroyVehicle(carvar[playerid]);
}
else return 0;
}
carvar[playerid] = INVALID_VEHICLE_ID;
return 1;
}