Exemple #1
0
        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);
        }
Exemple #2
0
 /// <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);
 }