-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClass1.cs
More file actions
79 lines (56 loc) · 2.68 KB
/
Copy pathClass1.cs
File metadata and controls
79 lines (56 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Rage;
using Rage.Native;
[assembly: Rage.Attributes.Plugin("RPHDemo", Description = "", Author = "")]
namespace GTA_V_pulgin
{
public static class Class1
{
public static void Main()
{
Vector3 spawnPosition = Game.LocalPlayer.Character.GetOffsetPositionFront(7f);
Vehicle vehicle = new Vehicle(spawnPosition);
Camera.DeleteAllCameras();
GameFiber.Sleep(1000);
Camera CharacterDesignerCam = new Camera(false);
CharacterDesignerCam.FOV = 60.0f;
CharacterDesignerCam.Active = true;
CharacterDesignerCam.PointAtEntity(vehicle, new Vector3(), false);
//Camera CharacterDesignerCam = new Camera(false);
//Nati
//GameFiber.Sleep(5000);
//CharacterDesignerCam.PointAtEntity(Game.LocalPlayer.Character, new Vector3(), false);
//CharacterDesignerCam.Active = true;
float angle = 0;
float dist = 10;
for (int i = 0; i < 10000; i++)
{
// Start a new fiber, that'll execute the HandleSuicideBomber method.
//GameFiber.StartNew(Class1.HandleSuicideBomber);
//NativeFunction.Natives.DrawLine(vehicle.FrontPosition.X, vehicle.FrontPosition.Y, vehicle.FrontPosition.Z, vehicle.FrontPosition.X, vehicle.FrontPosition.Y, vehicle.FrontPosition.Z + 2, 255, 0, 0, 255);
//NativeFunction.Natives.DrawLine(vehicle.LeftPosition.X, vehicle.LeftPosition.Y, vehicle.LeftPosition.Z, vehicle.LeftPosition.X, vehicle.LeftPosition.Y, vehicle.LeftPosition.Z + 1, 255, 0, 0, 255);
CharacterDesignerCam.Position = vehicle.Position + new Vector3((float)Math.Sin(angle) * dist, (float)Math.Cos(angle) * dist, 0.5f);
angle += 0.01f;
GameFiber.Yield();
//NativeFunction.Natives.DrawCircle(Rage.World.ConvertWorldPositionToScreenPosition(vehicle.FrontPosition), 10.0f, 10, 255, 255);
try
{
Game.DisplaySubtitle(Rage.World.ConvertWorldPositionToScreenPosition(vehicle.FrontPosition).ToString());
Vector2 position= new Vector2(0, 0);
//Game.LogTrivial("Enabling Player Loop...");
float radius = 0;
Color color = Color.White;
//Rage.Graphics.DrawCircle(position, radius, color);
}
finally
{
}
}
}
}
}