Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Vector2 origin = TextDrawDrawer.Middle;
- static List<TextDraw> textDraws = new List<TextDraw>();
- static float scale = 1F;
- [Command("speedo")]
- [Float("x")]
- [Float("y")]
- [Float("s")]
- public static void TDCommand(GtaPlayer player, float x, float y, float s) {
- foreach(TextDraw t in textDraws)
- t.Dispose();
- textDraws.Clear();
- origin = new Vector2(x, y);
- scale = s;
- CalcTDs();
- Show(player);
- }
- [Command("show")]
- public static void Show(GtaPlayer player) {
- foreach(TextDraw t in textDraws)
- t.Show(player);
- }
- [Command("hide")]
- public static void Hide(GtaPlayer player) {
- foreach(TextDraw t in textDraws)
- t.Hide(player);
- }
- public static void CalcTDs() {
- TextDraw t;
- int maxSpeed = 260;
- int points = maxSpeed / 20;
- float degrees = 270 / (float)points;
- for(int i = 0; i < points + 1; i++) {
- t = new TextDraw(origin + Mathf.Forward(((270 / (float)points) * i) + 45, scale), ".");
- textDraws.Add(t);
- }
- ///speedo 84 375 60
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement