Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // [REMOVED CONTENT]
- // [REMOVED CONTENT]
- {
- using Rage;
- using Rage.Attributes;
- using Rage.Native;
- using RAGENativeUI.Elements;
- using System;
- using System.Drawing;
- using System.Linq;
- using System.Windows.Forms;
- public static class EntryPoint
- {
- public static bool isFlying = false;
- public static Ped player;
- public static ResText curPos;
- public static Vector3 curPlayerPos;
- [ConsoleCommand]
- public static void Command_TeleportToInterior()
- {
- int interior = NativeFunction.CallByName<int>("GET_INTERIOR_AT_COORDS", 228.60580444335938f, -992.0537109375f, 100);
- NativeFunction.CallByHash<uint>(0x2CA429C029CCF247, interior);
- // Vector3 coords = NativeFunction.CallByName<Vector3>("GET_OFFSET_FROM_INTERIOR_IN_WORLD_COORDS", interior, 199.97149658203125f, -999.6677856445312f, -100.0f);
- Vector3 coords = new Vector3(228.60580444335938f, -992.0537109375f, 100);
- World.TeleportLocalPlayer(coords, false);
- }
- [ConsoleCommand]
- public static void Command_GetCoordinates()
- {
- Vector3 pos = Game.LocalPlayer.Character.Position;
- Game.Console.Print(pos.X + " : " + pos.Y + " : " + pos.Z);
- }
- public static void Main()
- {
- NativeFunction.CallByName<uint>("_ENABLE_MP_DLC_MAPS", true);
- NativeFunction.CallByName<uint>("_LOAD_MP_DLC_MAPS");
- player = Game.LocalPlayer.Character;
- Point labelPos = new Point(500, 10);
- curPos = new ResText("Position: 0 0 0", labelPos, 0.25f, Color.White);
- curPos.Centered = true;
- curPos.Outline = true;
- curPos.TextAlignment = ResText.Alignment.Centered;
- while (true)
- {
- curPlayerPos = player.Position;
- curPos.Caption = "Position: " + curPlayerPos.X + " " + curPlayerPos.Y + " " + curPlayerPos.Z;
- curPos.Draw();
- // [REMOVED CONTENT]
- GameFiber.Yield();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement