Jump to content

طلب كزد تحريك لوحة من يمين للشمال


Recommended Posts

TimeGuiSetRightC = { } 
  
function guiMoveRightToCenter(gui) 
if getElementData(gui,"HelhGui") == false then 
    setElementData(gui,"HelhGui",true) 
    local s1,s2=guiGetScreenSize() 
    local w1,w2=guiGetSize(gui,false) 
    local x,y = (s1-w1)/2,(s2-w2)/2 
    guiSetPosition(gui,-x,y,false)  
  
TimeGuiSetRightC[gui] = setTimer(guiMoveRightToCenter,50,0,gui) 
end 
    local a,b=guiGetScreenSize() 
    local w1,w2=guiGetSize(gui,false) 
    local x,y = (a-w1)/2,(b-w2)/2 
    local x1,y1 = guiGetPosition ( gui, false) 
if (x1 >= x) then 
    killTimer(TimeGuiSetRightC[gui]) 
    setElementData(gui,"HelhGui",false) 
    else 
    guiSetPosition(gui,x1+10,y,false) 
end 
end 

By : Booo

Link to comment

ليش كل هذا , تقدر تختصره بهذا 
 

function guiMoveRtoC( gui )
  local w,h = guiGetSize(gui);
  local _,y = guiGetPosition(gui);
  local scW,scH = guiGetScreenSize();
  local cpos = (w-scW)/2;
  local x = interpolateBetween(0,0,0,cpos,0,0,(getTickCount()-MyCount)/1000,"OutQuad")
  guiSetPosition(gui,x,y,false)
  MyCount = getTickCount()
  addEventHandler("onClientRender",root,guiMoveRtoC)
  if x == cpos then
    removeEventHandler("onClientRender",root,guiMoveRtoC)
    end
  end

 

Edited by iMr.WiFi..!
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...