Ejemplo n.º 1
0
		public static Checkpoint CreateCheckpoint(CheckpointIcon icon, Vector3 position, Vector3 pointTo, float radius, System.Drawing.Color color, byte reserved = 0)
		{
			int handle = Function.Call<int>(Hash.CREATE_CHECKPOINT, icon, position.X, position.Y, position.Z, pointTo.X, pointTo.Y, pointTo.Z, radius, color.R, color.G, color.B, color.A, reserved);

			if (handle == 0)
			{
				return null;
			}

			return new Checkpoint(handle);
		}
Ejemplo n.º 2
0
        public void create_gta_checkpoint_beacon(CheckpointIcon iconType, CheckpointColor color, CheckpointColor iconColor, float radius, float height)
        {
            if (this.isVisible == false)
            {
                this.isVisible = true;

                this.checkpoint_handle = Function.Call <int>(Hash.CREATE_CHECKPOINT, (int)iconType, this.position.X, this.position.Y, this.position.Z - this.positionZOffset, this.pointTo.X, this.pointTo.Y, this.pointTo.Z, radius, color.red, color.green, color.blue, color.alpha, 0);
                Function.Call(Hash._SET_CHECKPOINT_ICON_RGBA, this.checkpoint_handle, iconColor.red, iconColor.green, iconColor.blue, iconColor.alpha);
                Function.Call(Hash.SET_CHECKPOINT_CYLINDER_HEIGHT, this.checkpoint_handle, height + this.positionZOffset, height + this.positionZOffset, height);
            }
        }
Ejemplo n.º 3
0
        public void TargetNext(bool isLastLap = false)
        {
            CheckpointIcon icon = this.GetNextIcon(isLastLap);

            // Target the next index
            this.targetIndex = this.NextTargetIndex();

            // display the next checkpoint.
            this.Show(this.targetIndex, icon);

            if (!this.IsFinishLine(this.targetIndex, isLastLap))
            {
                this.ShowFutureBlip();
            }
        }
Ejemplo n.º 4
0
        public static Checkpoint CreateCheckpoint(CheckpointIcon icon, Vector3 position, Vector3 pointTo, float radius, Color color)
        {
            InputArgument[] arguments = new InputArgument[13];
            arguments[0]  = icon;
            arguments[1]  = position.X;
            arguments[2]  = position.Y;
            arguments[3]  = position.Z;
            arguments[4]  = pointTo.X;
            arguments[5]  = pointTo.Y;
            arguments[6]  = pointTo.Z;
            arguments[7]  = radius;
            arguments[8]  = color.R;
            arguments[9]  = color.G;
            arguments[10] = color.B;
            arguments[11] = color.A;
            arguments[12] = 0;
            int handle = Function.Call <int>(Hash.CREATE_CHECKPOINT, arguments);

            return((handle != 0) ? new Checkpoint(handle) : null);
        }
Ejemplo n.º 5
0
 public void Show(int index, CheckpointIcon Icon)
 {
     this.GetByIndex(index).create_gta_checkpoint_beacon(Icon, this.checkpointColor, this.checkpointIconColor, this.checkpointRadius, this.checkpointHeight);
     this.GetByIndex(index).CreateGTABlip();
 }