Jump to content

Scripting Mod


Recommended Posts

Posted

السلام عليكم ... كنت عايز اعرف ازاي اضبط مقاسات الشاشة عند كل الاعبين  بس في مود الحياة الواقعية وذا هو الكود 

local sw, sh = guiGetScreenSize()

        local Width,Height = 350,350  

       local X = (sw/2) - (Width/2)

        local Y = (sh/2) - (Height/2)

كيف اضبطهه مع الاحداثيات مع العلم مقاسات الشاشة حقتي 

1600x900

Posted
-- لنفترض ان المقاسات
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;

 

Discord ID : nxFairlywell#6895

 

Posted (edited)

طيب كل ده تمام بس كيف اعرف مقاس شاشة الاعب يعني حتي دي مش فاهمها كويس 

sW ?!

@NX_CI

Edited by MGHooLBeeh

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...