Advertisement
Guest User

Untitled

a guest
Dec 29th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.14 KB | None | 0 0
  1. // [REMOVED CONTENT]
  2.  
  3. // [REMOVED CONTENT]
  4. {
  5.     using Rage;
  6.     using Rage.Attributes;
  7.     using Rage.Native;
  8.     using RAGENativeUI.Elements;
  9.     using System;
  10.     using System.Drawing;
  11.     using System.Linq;
  12.     using System.Windows.Forms;
  13.  
  14.     public static class EntryPoint
  15.     {
  16.         public static bool isFlying = false;
  17.         public static Ped player;
  18.  
  19.         public static ResText curPos;
  20.         public static Vector3 curPlayerPos;
  21.  
  22.         [ConsoleCommand]
  23.         public static void Command_TeleportToInterior()
  24.         {
  25.             int interior = NativeFunction.CallByName<int>("GET_INTERIOR_AT_COORDS", 228.60580444335938f, -992.0537109375f, 100);
  26.             NativeFunction.CallByHash<uint>(0x2CA429C029CCF247, interior);
  27.             // Vector3 coords = NativeFunction.CallByName<Vector3>("GET_OFFSET_FROM_INTERIOR_IN_WORLD_COORDS", interior, 199.97149658203125f, -999.6677856445312f, -100.0f);
  28.             Vector3 coords = new Vector3(228.60580444335938f, -992.0537109375f, 100);
  29.             World.TeleportLocalPlayer(coords, false);
  30.         }
  31.  
  32.         [ConsoleCommand]
  33.         public static void Command_GetCoordinates()
  34.         {
  35.             Vector3 pos = Game.LocalPlayer.Character.Position;
  36.             Game.Console.Print(pos.X + " : " + pos.Y + " : " + pos.Z);
  37.         }
  38.  
  39.         public static void Main()
  40.         {
  41.             NativeFunction.CallByName<uint>("_ENABLE_MP_DLC_MAPS", true);
  42.             NativeFunction.CallByName<uint>("_LOAD_MP_DLC_MAPS");
  43.  
  44.             player = Game.LocalPlayer.Character;
  45.             Point labelPos = new Point(500, 10);
  46.             curPos = new ResText("Position: 0 0 0", labelPos, 0.25f, Color.White);
  47.             curPos.Centered = true;
  48.             curPos.Outline = true;
  49.             curPos.TextAlignment = ResText.Alignment.Centered;
  50.  
  51.             while (true)
  52.             {
  53.                 curPlayerPos = player.Position;
  54.                 curPos.Caption = "Position: " + curPlayerPos.X + " " + curPlayerPos.Y + " " + curPlayerPos.Z;
  55.                 curPos.Draw();
  56.                 // [REMOVED CONTENT]
  57.                 GameFiber.Yield();
  58.             }
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement