Scott
1/31/2017 - 10:05 PM

tint_check.cs

Vector3 pos = playerPed.Position;

int vehicleHandle = Function.Call<int>(Hash.GET_CLOSEST_VEHICLE, pos.X, pos.Y, pos.Z, 3f, 0, 70);
Vehicle vehicle = new Vehicle(vehicleHandle);

Function.Call(Hash.SET_VEHICLE_WINDOW_TINT, vehicle, 1);

int vehicleTint = Function.Call<int>(Hash.GET_VEHICLE_WINDOW_TINT, vehicle.NativeValue);

Screen.ShowNotification(vehicleTint.ToString());

switch (vehicleTint)
{

    case 0:
        Screen.ShowNotification("Tint Reading: ~r~100%");
        return;

    case 1:
        Screen.ShowNotification("Tint Reading: ~r~10%");
        return;

    case 2:
        Screen.ShowNotification("Tint Reading: ~r~20%");
        return;

    case 3:
        Screen.ShowNotification("Tint Reading: ~r~30%");
        return;

    case 4:
        Screen.ShowNotification("Tint Reading: ~r~40%");
        return;

    case 5:
        Screen.ShowNotification("Tint Reading: ~r~20%");
        return;

    case 6:
        Screen.ShowNotification("Tint Reading: ~r~20%");
        return;

    default:
        Screen.ShowNotification("Tint Reading: ~r~ERROR");
        return;

}