コード例 #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);
        }
コード例 #2
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;
        }
コード例 #3
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);
 }
コード例 #4
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);
 }