Jump to content

طلب فتكشنات لوحتين بعالمين مختلفين


momar5600

Recommended Posts

سلام عليكم ورحمة الله وبركاتة

انا راح اسوي لوحتين بدي لوحة تفتح بعالم 0 ولوحة تفتح بعالم 1 وتكون بنفس زر

المطلوب فتكشنات الي تخلي لوحة تفتح بعالم 9 ولوحة اخرا تفتح بعالم 1 ونفس زر 

 

Link to comment
function guiWindowsOpen(Window, Window2, Dim1, Dim2)
  if getElementType(Window) ~= "gui-window" then error("Bad Argmuent at Argument 1 (got "..getElementType(Window).."") end
  if getElementType(Window2) ~= "gui-window" then error("Bad Argmuent at Argument 2 (got "..getElementType(Window2).."") end
  if not tonumber(Dim1) then error("Bad Argmuent at Argument 3 Must be a number") end
  if not tonumber(Dim2) then error("Bad Argmuent at Argument 4 Must be a number") end
  if getElementDimension(localPlayer) == Dim1 then
    guiSetVisible(Window, not guiGetVisible(Window))
      showCursor(guiGetVisible(Window))
  elseif getElementDimension(localPlayer) == Dim2 then
    guiSetVisible(Window2, not guiGetVisible(Window2))
      showCursor(guiGetVisible(Window2))
  end
end

ده كود سويتو لك

سوي هيك

bindKey("YourKey", "down",

function()

guiWindowsOpen(YourWind, Your2Wind, 0, 1)

end)

Link to comment
3 minutes ago, x1AhMeD,-09 said:

function guiWindowsOpen(Window, Window2, Dim1, Dim2)
  if getElementType(Window) ~= "gui-window" then error("Bad Argmuent at Argument 1 (got "..getElementType(Window).."") end
  if getElementType(Window2) ~= "gui-window" then error("Bad Argmuent at Argument 2 (got "..getElementType(Window2).."") end
  if not tonumber(Dim1) then error("Bad Argmuent at Argument 3 Must be a number") end
  if not tonumber(Dim2) then error("Bad Argmuent at Argument 4 Must be a number") end
  if getElementDimension(localPlayer) == Dim1 then
    guiSetVisible(Window, not guiGetVisible(Window))
      showCursor(guiGetVisible(Window))
  elseif getElementDimension(localPlayer) == Dim2 then
    guiSetVisible(Window2, not guiGetVisible(Window2))
      showCursor(guiGetVisible(Window2))
  end
end

ده كود سويتو لك

سوي هيك

bindKey("YourKey", "down",

function()

guiWindowsOpen(YourWind, Your2Wind, 0, 1)

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