Jump to content

طلب اصلاح كود


Recommended Posts

اسلام عليكم

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

ذا الكود

local x = 0 
local xx = 400  
  
  
addEventHandler("onClientRender",root,function() 
guiSetPosition(GUIEditor.window[1],x,200,false) 
x = x+0.5 
end) 

Link to comment

اذا تقصد انه الـ

gui

تتحركـ لليسار وتوقف في النص

  
function movetocenter(move_window) 
local xz = 0 
local screenW,screenH=guiGetScreenSize() 
local windowW,windowH=guiGetSize(move_window,false) 
local x = (screenW-windowW)/2 + 1000 
local y = (screenH-windowH)/2 
guiSetPosition(move_window,x,y,false) 
guiSetVisible(move_window,true) 
setTimer(function() xz = xz + 50 guiSetPosition(move_window,x-xz,y,false) end,50, 20)  
end 

تستخدمه كذا

movetocenter(اسم النافذه)

Link to comment

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...