MGHooLBeeh Posted July 13, 2019 Share Posted July 13, 2019 السلام عليكم ... كنت عايز اعرف ازاي اضبط مقاسات الشاشة عند كل الاعبين بس في مود الحياة الواقعية وذا هو الكود local sw, sh = guiGetScreenSize() local Width,Height = 350,350 local X = (sw/2) - (Width/2) local Y = (sh/2) - (Height/2) كيف اضبطهه مع الاحداثيات مع العلم مقاسات الشاشة حقتي 1600x900 Link to comment
nxFairlywell Posted July 13, 2019 Share Posted July 13, 2019 -- لنفترض ان المقاسات x=200;y=200;w=100;h=100; -- مقاسات شاشتك desW,desH=1600,900; -- تجيب مقاسات شاشة اللاعب العميل local sW,sH =guiGetScreenSize(); -- تعدل على المقاسات x =x/desW*sW; -- تقسم المقاس على شاشتك على نفس المحور طبعاً الصادي أو السيني و بعدين تضربه في مقاس شاشة اللاعب على نفس المحور y =y/desH*sH; w =w/desW*sW; h =h/desH*sH; Link to comment
MGHooLBeeh Posted July 13, 2019 Author Share Posted July 13, 2019 (edited) طيب كل ده تمام بس كيف اعرف مقاس شاشة الاعب يعني حتي دي مش فاهمها كويس sW ?! @NX_CI Edited July 13, 2019 by MGHooLBeeh Link to comment
HassoN Posted July 13, 2019 Share Posted July 13, 2019 35 minutes ago, MGHooLBeeh said: طيب كل ده تمام بس كيف اعرف مقاس شاشة الاعب يعني حتي دي مش فاهمها كويس sW ?! @NX_CI sW = عرض شاشة اللاعب sH = طول شاشة اللاعب Link to comment
MGHooLBeeh Posted July 13, 2019 Author Share Posted July 13, 2019 @HassoN ممكن تقبل ادد ديسكورد Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now