Jump to content

help


Faraon,

Recommended Posts

مرحبا .. كيفكم ..

 

انا سويت لوحة .. بها زرين تفتح بهم الباب مثال

 

button = guiCreateButton(65, 61, 244, 60, "فتح", false, window)
button2 = guiCreateButton(65, 148, 244, 60, "اغلاق", false, window)

-- DOOR --
door = createObject(980,1893.0999755859,-15.5,36.599998474121,0,0,345)
function closedoor()
moveObject (door,4000,1893.0999755859,-15.5,36.599998474121)
end

bindKey(button2,closedoor) -- by the function name
function opendoor()
moveObject(door,4000,1893.1999511719,-15.300000190735,43.099998474121)
end
bindKey(button,opendoor) -- by the function name

وما يريد يفتح ولا .... ( مو شغال ) الحل ايش؟

Link to post
button = guiCreateButton(65, 61, 244, 60, "فتح", false, window)
button2 = guiCreateButton(65, 148, 244, 60, "اغلاق", false, window)
--------------------------------------------------------

door = createObject(980,1893.0999755859,-15.5,36.599998474121,0,0,345)

function brFunc(stat)
	if stat == "close" then
moveObject (door,4000,1893.0999755859,-15.5,36.599998474121)
    else
moveObject(door,4000,1893.1999511719,-15.300000190735,43.099998474121)
    end
end

addEventHandler( "onClientGUIClick", getRootElement(),
	function()
		if source == button then
			brFunc("open")
		elseif source == button2 then
		    brFunc("close")
		end
	end
);

 

  • Thanks 1
Link to post
4 minutes ago, #BrosS said:

button = guiCreateButton(65, 61, 244, 60, "فتح", false, window)
button2 = guiCreateButton(65, 148, 244, 60, "اغلاق", false, window)
--------------------------------------------------------

door = createObject(980,1893.0999755859,-15.5,36.599998474121,0,0,345)

function brFunc(stat)
	if stat == "close" then
moveObject (door,4000,1893.0999755859,-15.5,36.599998474121)
    else
moveObject(door,4000,1893.1999511719,-15.300000190735,43.099998474121)
    end
end

addEventHandler( "onClientGUIClick", getRootElement(),
	function()
		if source == button then
			brFunc("open")
		elseif source == button2 then
		    brFunc("close")
		end
	end
);

 

.. ِشكرا لك اخي بروس :x

Link to post

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