Mr.Mostafa Posted April 22, 2018 Share Posted April 22, 2018 آلسلام عليكم آنآ سويت لوحة علي آلسريع وخليتهآ تفتح من آف 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
David O.Ford Posted April 22, 2018 Share Posted April 22, 2018 addCommandHandler("الكلمة", Open) Link to comment
Mr.Mostafa Posted April 22, 2018 Author Share Posted April 22, 2018 (edited) 10 minutes ago, David O.Ford said: addCommandHandler("الكلمة", Open) آدري لكن آبيهآ تفتح برتبة معينة Edited April 22, 2018 by Mr.Mostafa Link to comment
David O.Ford Posted April 22, 2018 Share Posted April 22, 2018 Just now, Mr.Mostafa said: آدري لكن آبيهآ تفتح برتبة معينة function ( p ) if getElementType ( p ) == "player" then local acc = getPlayerAccount ( p ) if acc and not isGuestAccount ( acc ) then if isObjectInACLGroup ( "user."..getAccountName ( acc ), aclGetGroup ( "اسم الرتبة" ) ) then triggerClientEvent ( p, "Open", resourceRoot ) end end end end ) Link to comment
Mr.Mostafa Posted April 22, 2018 Author Share Posted April 22, 2018 1 minute ago, David O.Ford said: function ( p ) if getElementType ( p ) == "player" then local acc = getPlayerAccount ( p ) if acc and not isGuestAccount ( acc ) then if isObjectInACLGroup ( "user."..getAccountName ( acc ), aclGetGroup ( "اسم الرتبة" ) ) then triggerClientEvent ( p, "Open", resourceRoot ) end end end end ) يب آدري - لكن لمآ آربطهم بكود فتح آللوحة - مآ تشتغل + لو تقدر تعطيني آلكود كله كآمل هآته Link to comment
+Source|> Posted April 24, 2018 Share Posted April 24, 2018 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
Mr.Mostafa Posted April 24, 2018 Author Share Posted April 24, 2018 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
+Source|> Posted April 24, 2018 Share Posted April 24, 2018 4 hours ago, Mr.Mostafa said: مآ آشتغل متأكد ؟ Link to comment
Mr.Mostafa Posted April 24, 2018 Author Share Posted April 24, 2018 Just now, Source|> said: متأكد ؟ يب Link to comment
+Source|> Posted April 24, 2018 Share Posted April 24, 2018 Just now, Mr.Mostafa said: يب وش يقولك الديبق 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