Пример #1
0
        public static async void CheckPosForOpenMenu()
        {
            var playerPos = GetEntityCoords(GetPlayerPed(-1), true);
            int shopId    = GetBarIdInRadius(playerPos, 2f);

            if (shopId == -1)
            {
                return;
            }
            MenuList.ShowBarMenu(shopId, await Business.GetPrice(shopId));
        }
Пример #2
0
 public static async void CheckPosForOpenMenu()
 {
     var playerPos = GetEntityCoords(GetPlayerPed(-1), true);
     int shopId = GetShopIdInRadius(playerPos, 2f);
     if (shopId == -1)
     {
         if (Main.GetDistanceToSquared(playerPos, ShopElPos) < 2f)
             MenuList.ShowElectroShopMenu(120);
         if (Main.GetDistanceToSquared(playerPos, ShopElPos1) < 2f)
             MenuList.ShowElectroShopMenu(126);
         return;
     }
     MenuList.ShowShopMenu(shopId, await Business.GetPrice(shopId));
 }