09.05.2017, 10:33
PHP Code:
foreach(new i: Player)
{
if(PI[i][cCarId][0] == PI[playerid][cCarId][0] && PI[playerid][cCarId][0] != INVALID_VEHICLE_ID)
{
DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][0]]);
DestroyVehicle(PI[playerid][cCarId][0]);
PI[playerid][cCarId][0] = INVALID_VEHICLE_ID;
}
if(PI[i][cCarId][1] == PI[playerid][cCarId][1] && PI[playerid][cCarId][1] != INVALID_VEHICLE_ID)
{
DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][1]]);
DestroyVehicle(PI[playerid][cCarId][1]);
PI[playerid][cCarId][1] = INVALID_VEHICLE_ID;
}
if(PI[i][cCarId][2] == PI[playerid][cCarId][2] && PI[playerid][cCarId][2] != INVALID_VEHICLE_ID)
{
DestroyDynamic3DTextLabel(VehicleLabel[PI[playerid][cCarId][2]]);
DestroyVehicle(PI[playerid][cCarId][2]);
PI[playerid][cCarId][2] = INVALID_VEHICLE_ID;
}
}