Advertisement
Guest User

Untitled

a guest
Apr 12th, 2020
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using NativeUI;
  2. using GTA;
  3. using GTA.Native;
  4. using GTA.Math;
  5. using System;
  6. using System.Windows.Forms;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. using System.Drawing;
  10. using System.Media;
  11.  
  12. public class template : Script
  13. {
  14.     private Ped playerPed = Game.Player.Character;
  15.     private Player player = Game.Player;
  16.     private MenuPool _menuPool;
  17.  
  18.     public template()
  19.     {
  20.         UI.Notify("Script ScriptTemplate ~r~Loaded~w~!");
  21.         StartInfo();
  22.         Tick += OnTick;
  23.         KeyDown += OnKeyDown;
  24.         KeyUp += OnKeyUp;      
  25.     }
  26.  
  27.     private void OnTick(object sender, EventArgs e)
  28.     {
  29.  
  30.     }
  31.  
  32.     private void OnKeyDown(object sender, KeyEventArgs e)
  33.     {
  34.         if (e.KeyCode == Keys.F10)
  35.         {
  36.             Menu();
  37.         }
  38.     }
  39.  
  40.     private void StartInfo()
  41.     {
  42.         UI.ShowSubtitle("Click ~g~F10 ~w~for open ~r~Menu~w~.", 3000);
  43.     }
  44.  
  45.     private void Menu()
  46.     {
  47.         var mainMenu = new UIMenu("Native UI", "~b~NATIVEUI SHOWCASE");
  48.         _menuPool.Add(mainMenu);
  49.         _menuPool.ProcessMenus();
  50.  
  51.         mainMenu.Visible = true;
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement