private static unsafe VehicleColor UnsafeGetVehicleColors(Vehicle vehicle) { int colorPrimaryInt; int colorSecondaryInt; ulong GetVehicleColorsHash = 0xa19435f193e081ac; NativeFunction.CallByHash <uint>(GetVehicleColorsHash, vehicle, &colorPrimaryInt, &colorSecondaryInt); VehicleColor colors = new VehicleColor(); colors.PrimaryColor = (EPaint)colorPrimaryInt; colors.SecondaryColor = (EPaint)colorSecondaryInt; return(colors); }
private static unsafe VehicleColor UnsafeGetVehicleColors(Vehicle vehicle) { int colorPrimaryInt; int colorSecondaryInt; ulong GetVehicleColorsHash = 0xa19435f193e081ac; NativeFunction.CallByHash<uint>(GetVehicleColorsHash, vehicle, &colorPrimaryInt, &colorSecondaryInt); VehicleColor colors = new VehicleColor(); colors.PrimaryColor = (EPaint)colorPrimaryInt; colors.SecondaryColor = (EPaint)colorSecondaryInt; return colors; }
/// <summary> /// Sets the color to this Rage.Vehicle instance /// </summary> /// <param name="v"></param> /// <param name="color">The color</param> public static void SetColors(this Vehicle v, VehicleColor color) { NativeFunction.CallByName<uint>("SET_VEHICLE_COLOURS", v, (int)color.PrimaryColor, (int)color.SecondaryColor); }
/// <summary> /// Sets the color to this Rage.Vehicle instance /// </summary> /// <param name="v"></param> /// <param name="color">The color</param> public static void SetColors(this Vehicle v, VehicleColor color) { NativeFunction.CallByName <uint>("SET_VEHICLE_COLOURS", v, (int)color.PrimaryColor, (int)color.SecondaryColor); }