Jump to content

x[ مشكلة بلوحة ]x : تفتح من يسآر ليمين


Recommended Posts

آلسلام عليكم

 

آنآ سويت لوحة علي آلسريع

وخليتهآ تفتح من آف 3 من آليسآر لليمين وآشتغلت 

 

لكن آلمشكلة آنآ كنت مسوي لوحة ومخليهآ تفتح بكلمة من آف 8

وآجي آحط نفس آلآكوآد وآجي آكتب آلكلمة بآف 8 آللوحة تفتح عآدي مب من آليسآر لليمين

 

آلآكوآد آلي حآطتتههآ في آلكلنت في آللوحتين :


function Open ( )
guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]))
showCursor(guiGetVisible(GUIEditor.window[1]))
guiMoveRightToLeft(GUIEditor.window[1])
end


TimeGuiSetRightC = { }
function guiMoveRightToLeft(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(guiMoveRightToLeft,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+20,y,false)
end
end

 

Link to comment
1 minute ago, David O.Ford said:
  1. function ( p )
  2. if getElementType ( p ) == "player" then
  3. local acc = getPlayerAccount ( p )
  4. if acc and not isGuestAccount ( acc ) then
  5. if isObjectInACLGroup ( "user."..getAccountName ( acc ), aclGetGroup ( "اسم الرتبة" ) ) then
  6. triggerClientEvent ( p, "Open", resourceRoot )
  7. end
  8. end
  9. end
  10. end
  11. )

يب آدري - لكن لمآ آربطهم بكود فتح آللوحة - مآ تشتغل 

 

+ لو تقدر تعطيني آلكود كله كآمل هآته

Link to comment
9 hours ago, Mr.Mostafa said:

آب

-- client

addEvent("Open", true)
addEventHandler("Open", root,
function  ( )
guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]))
showCursor(guiGetVisible(GUIEditor.window[1]))
guiMoveRightToLeft(GUIEditor.window[1])
end )


TimeGuiSetRightC = { }
function guiMoveRightToLeft(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(guiMoveRightToLeft,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+20,y,false)
end
end
--server

addComandHandler("open",
	function ( player )
local accName = getAccountName( getPlayerAccount( player ) )
	if isObjectInACLGroup( "user."..accName, aclGetGroup( "Console" ) ) then
		triggerClientEvent( player, "Open", player )
	end
end )

جرب

Link to comment
23 minutes ago, Source|> said:

-- client

addEvent("Open", true)
addEventHandler("Open", root,
function  ( )
guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1]))
showCursor(guiGetVisible(GUIEditor.window[1]))
guiMoveRightToLeft(GUIEditor.window[1])
end )


TimeGuiSetRightC = { }
function guiMoveRightToLeft(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(guiMoveRightToLeft,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+20,y,false)
end
end

--server

addComandHandler("open",
	function ( player )
local accName = getAccountName( getPlayerAccount( player ) )
	if isObjectInACLGroup( "user."..accName, aclGetGroup( "Console" ) ) then
		triggerClientEvent( player, "Open", player )
	end
end )

جرب

مآ آشتغل

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