MATGR

Membre
  • Compteur de contenus

    4
  • Inscription

  • Dernière visite

À propos de MATGR

  • Rang
    Newbie

Informations de profil

  • Plateforme(s)
    PC
  • GTA favori
    GTA V

Comptes de jeux

  • Steam
    matgr3000
  • Social Club
    MATGR79
  1. Oui j'écris mon propre mod menu en C# (ScriptHookV .NET) J'ai déjà demander de l'aide sur des forums anglais et j'ai copier coller xD
  2. Désolé, justement je suis français Je voudrais récupérer tous les joueurs qui sont dans la session J'ai déjà essayer ce code mais il donne ça : http://prntscr.com/9pmcjj Mon code : CloseMenus(); var menuItems = new List<IMenuItem>(); foreach(Player p in GetPlayers()) { var button = new MenuButton(p.Name); button.Activated += (sender, args) => { this.OnlinePlayerMenu(p); //and here is the function your will call if its activated. }; menuItems.Add(button); } var back = new MenuButton("< Back"); back.Activated += (sender, args) => { this.MainMenu(); //and here is the function your will call if its activated. }; menuItems.Add(back); Menu = new GTA.Menu("Players", menuItems.ToArray()); //Interface Menu.HeaderFont = Font.HouseScript; Menu.HeaderColor = System.Drawing.Color.MediumBlue; Menu.HeaderCentered = false; Menu.HeaderHeight = 35; Menu.HeaderTextColor = System.Drawing.Color.White; Menu.HeaderTextScale = 0.7F; Menu.ItemHeight = 33; Menu.ItemTextCentered = false; Menu.ItemTextScale = 0.35F; Menu.SelectedItemColor = System.Drawing.Color.White; Menu.SelectedTextColor = System.Drawing.Color.Black; Menu.UnselectedItemColor = System.Drawing.Color.Black; Menu.UnselectedTextColor = System.Drawing.Color.White; Menu.HasFooter = false; View.MenuPosition = new System.Drawing.Point(1000, 100); this.View.AddMenu(Menu); List<Player> GetPlayers() { List<Player> players = new List<Player>(); List<Ped> peds = new List<Ped>(); foreach (Ped i in GTA.World.GetAllPeds()) { peds.Add(i); } foreach (Ped i in peds) { if (i.IsPlayer) { players.Add(GTA.Native.Function.Call<Player>(GTA.Native.Hash.GET_PLAYER_PED, i)); } } return players; } Merci d'avance
  3. How to get all players online?My code (don't work) : CloseMenus(); var menuItems = new List<IMenuItem>(); foreach(Player p in GetPlayers()) { var button = new MenuButton(p.Name); button.Activated += (sender, args) => { this.OnlinePlayerMenu(p); //and here is the function your will call if its activated. }; menuItems.Add(button); } var back = new MenuButton("< Back"); back.Activated += (sender, args) => { this.MainMenu(); //and here is the function your will call if its activated. }; menuItems.Add(back); Menu = new GTA.Menu("Players", menuItems.ToArray()); //Interface Menu.HeaderFont = Font.HouseScript; Menu.HeaderColor = System.Drawing.Color.MediumBlue; Menu.HeaderCentered = false; Menu.HeaderHeight = 35; Menu.HeaderTextColor = System.Drawing.Color.White; Menu.HeaderTextScale = 0.7F; Menu.ItemHeight = 33; Menu.ItemTextCentered = false; Menu.ItemTextScale = 0.35F; Menu.SelectedItemColor = System.Drawing.Color.White; Menu.SelectedTextColor = System.Drawing.Color.Black; Menu.UnselectedItemColor = System.Drawing.Color.Black; Menu.UnselectedTextColor = System.Drawing.Color.White; Menu.HasFooter = false; View.MenuPosition = new System.Drawing.Point(1000, 100); this.View.AddMenu(Menu); List<Player> GetPlayers() { List<Player> players = new List<Player>(); List<Ped> peds = new List<Ped>(); foreach (Ped i in GTA.World.GetAllPeds()) { peds.Add(i); } foreach (Ped i in peds) { if (i.IsPlayer) { players.Add(GTA.Native.Function.Call<Player>(GTA.Native.Hash.GET_PLAYER_PED, i)); } } return players; } Result : http://prntscr.com/9pmcjj