Shahin 226 Posted November 3, 2020 Share Posted November 3, 2020 (edited) Hello devs, I would like to know how to remove the useless Sell button from the private shop. Also: how to center the Buy button afterwards? Thank you Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member Solution xP3NG3Rx 19761 Posted November 4, 2020 Honorable Member Solution Share Posted November 4, 2020 (edited) ## uiShop.py def Open(self, vid): import chr isPrivateShop = chr.IsNPC(vid) == 0 if player.IsMainCharacterIndex(vid): isMainPlayerPrivateShop = True self.btnBuy.Hide() self.btnSell.Hide() self.btnClose.Show() else: isMainPlayerPrivateShop = False if isPrivateShop: self.vid = vid self.btnBuy.SetPosition(0, 295) self.btnBuy.SetWindowHorizontalAlignCenter() self.btnBuy.Show() self.btnSell.Hide() self.btnClose.Hide() This depends on your shop system too. The actortype of your shops are cannot be NPC type. Otherwise you need to change the value of the isPrivateShop variable. Edited November 4, 2020 by xP3NG3Rx 4 Link to comment Share on other sites More sharing options...
Shahin 226 Posted November 4, 2020 Author Share Posted November 4, 2020 Thank you very much! It works perfectly Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now