#1Mr.AmeeD Posted September 1, 2015 Author Share Posted September 1, 2015 وربي م يظبط في مشكلة ): Link to comment
!#NssoR_) Posted September 1, 2015 Share Posted September 1, 2015 وين الكود الي سويته ؟؟ Link to comment
#1Mr.AmeeD Posted September 1, 2015 Author Share Posted September 1, 2015 client ~ Opc = true addEventHandler ("onClientGUIClick", root, function () if source == m then if ( Opc == true ) then triggerServerEvent ( "OpenB", localPlayer ) guiSetText (m,"Close") guiSetProperty(m, "NormalTextColour", "FFFF0000") Opc = false else triggerServerEvent ( "CloseB", localPlayer ) guiSetText (m,"Open") guiSetProperty(m, "NormalTextColour", "FF00FF00") Opc = true end end end ) server ~ TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) addEvent( "OpenB", true ) addEventHandler("OpenB", root, function () moveObject (TheDoor,1000,-536.90002441406,3821.8000488281,5.4000000953674) end ) addEvent( "CloseB", true ) addEventHandler("CloseB", root, function () moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) end ) Link to comment
!#NssoR_) Posted September 1, 2015 Share Posted September 1, 2015 اتمني ماتعدل ع كودي هاذا وتجربه بنفسك اذا اشتغل عدل عليه واذا خرب حاول تكتشف خطأك بنفسك #Client.. addEventHandler("onClientResourceStart", resourceRoot, function() m = guiCreateButton(0.42, 0.40, 0.15, 0.08, "Move object", true) guiSetProperty(m, "NormalTextColour", "FFAAAAAA") end ) Opc = true addEventHandler ("onClientGUIClick", root, function () if source == m then if ( Opc == true ) then triggerServerEvent ( "OpenB", localPlayer ) guiSetText (m,"Close") guiSetProperty(m, "NormalTextColour", "FFFF0000") Opc = false else triggerServerEvent ( "CloseB", localPlayer ) guiSetText (m,"Open") guiSetProperty(m, "NormalTextColour", "FF00FF00") Opc = true end end end ) #Server.. TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) addEvent( "OpenB", true ) addEventHandler("OpenB", root, function () moveObject (TheDoor,1000,96.699996948242,1924.9999511719,18.89999961853) end ) addEvent( "CloseB", true ) addEventHandler("CloseB", root, function () moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) end ) Link to comment
Rockyz Posted September 1, 2015 Share Posted September 1, 2015 اتمني ماتعدل ع كودي هاذا وتجربه بنفسك اذا اشتغل عدل عليه واذا خرب حاول تكتشف خطأك بنفسك #Client.. addEventHandler("onClientResourceStart", resourceRoot, function() m = guiCreateButton(0.42, 0.40, 0.15, 0.08, "Move object", true) guiSetProperty(m, "NormalTextColour", "FFAAAAAA") end ) Opc = true addEventHandler ("onClientGUIClick", root, function () if source == m then if ( Opc == true ) then triggerServerEvent ( "OpenB", localPlayer ) guiSetText (m,"Close") guiSetProperty(m, "NormalTextColour", "FFFF0000") Opc = false else triggerServerEvent ( "CloseB", localPlayer ) guiSetText (m,"Open") guiSetProperty(m, "NormalTextColour", "FF00FF00") Opc = true end end end ) #Server.. TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) addEvent( "OpenB", true ) addEventHandler("OpenB", root, function () moveObject (TheDoor,1000,96.699996948242,1924.9999511719,18.89999961853) end ) addEvent( "CloseB", true ) addEventHandler("CloseB", root, function () moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) end ) نصور يمكن هو قصده مو زر gui يمكن زر من الكيبورد وكودي مجربنه 100% شغال Link to comment
#1Mr.AmeeD Posted September 1, 2015 Author Share Posted September 1, 2015 اتمني ماتعدل ع كودي هاذا وتجربه بنفسك اذا اشتغل عدل عليه واذا خرب حاول تكتشف خطأك بنفسك #Client.. addEventHandler("onClientResourceStart", resourceRoot, function() m = guiCreateButton(0.42, 0.40, 0.15, 0.08, "Move object", true) guiSetProperty(m, "NormalTextColour", "FFAAAAAA") end ) Opc = true addEventHandler ("onClientGUIClick", root, function () if source == m then if ( Opc == true ) then triggerServerEvent ( "OpenB", localPlayer ) guiSetText (m,"Close") guiSetProperty(m, "NormalTextColour", "FFFF0000") Opc = false else triggerServerEvent ( "CloseB", localPlayer ) guiSetText (m,"Open") guiSetProperty(m, "NormalTextColour", "FF00FF00") Opc = true end end end ) #Server.. TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) addEvent( "OpenB", true ) addEventHandler("OpenB", root, function () moveObject (TheDoor,1000,96.699996948242,1924.9999511719,18.89999961853) end ) addEvent( "CloseB", true ) addEventHandler("CloseB", root, function () moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) end ) نصور يمكن هو قصده مو زر gui يمكن زر من الكيبورد وكودي مجربنه 100% شغال يخي سويت مثل كودك وكل شي وركبت البوابة وظهرت وكل شي يخي بس باقي حرف الـ m اطغطه م يجي شي وش الحل !! ؟ يمديك تسويه لي ع شكل مود وترسله ؟ !! Link to comment
The Killer Posted September 1, 2015 Share Posted September 1, 2015 وش تبي انت الحين وش تبيه يكون ؟ تبيه زر من الكيبورد ولا زر من لوحه ولا وش ؟ Link to comment
iMr.SFA7 Posted September 1, 2015 Share Posted September 1, 2015 طيب قل أنك تبيه من حرف؟ الأخوان يحسبونك تبيه من زر bindKey Link to comment
Rockyz Posted September 1, 2015 Share Posted September 1, 2015 طيب قل أنك تبيه من حرف؟الأخوان يحسبونك تبيه من زر bindKey اذا من زر كيبورد يفضل ماركر Link to comment
iMr.SFA7 Posted September 1, 2015 Share Posted September 1, 2015 اذا من زر كيبورد يفضل ماركر ماركر آيش؟ Link to comment
Rockyz Posted September 1, 2015 Share Posted September 1, 2015 اذا من زر كيبورد يفضل ماركر ماركر آيش؟ يعني يسوي ماركر صوب البوابة اذا هو داخل الماركر يضغط M تنفتح ليه البوابة اذا مو داخله ماتنفتح البوابة Link to comment
#1Mr.AmeeD Posted September 1, 2015 Author Share Posted September 1, 2015 يب ابيها بزر بالكيبورد لأهنتو .. Link to comment
iMr.SFA7 Posted September 1, 2015 Share Posted September 1, 2015 (edited) -- # Client Side : TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) Door = false bindKey ( "m", "down", function () if ( Door == false ) then moveObject (TheDoor,1000,96.699996948242,1924.9999511719,18.89999961853) Door = true else moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) Door = false end end ) Edited September 1, 2015 by Guest Link to comment
TAPL Posted September 1, 2015 Share Posted September 1, 2015 -- # Server Side : TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) Door = false bindKey ( "m", "down", function () if ( Door == false ) then moveObject (TheDoor,1000,96.699996948242,1924.9999511719,18.89999961853) Door = true else moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) Door = false end end ) http://i.imgur.com/tK9KcQY.png Link to comment
iMr.SFA7 Posted September 1, 2015 Share Posted September 1, 2015 http://i.imgur.com/tK9KcQY.png كنت أقصصد كلنت حطيته سيرفر ذذذ عدلته Link to comment
TAPL Posted September 1, 2015 Share Posted September 1, 2015 http://i.imgur.com/tK9KcQY.png كنت أقصصد كلنت حطيته سيرفر ذذذ عدلته اخوي ردي مو مجرد تزويد مشاركات ولكن انت تبي جاهز وماتبي تتعلم ذذ + ترا البوابه بتتحرك عند الي ضغط الزر فقط مو الكل Link to comment
Rockyz Posted September 1, 2015 Share Posted September 1, 2015 (edited) Deleted. Edited September 1, 2015 by Guest Link to comment
iMr.SFA7 Posted September 1, 2015 Share Posted September 1, 2015 صحيح عند الي ضغط الزر لآكن هو ما قآل يبيها لـ من تتحرك الي ضغط أو الكل؟ اذا يبيها للكل = )) -- # Server Side : TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) Door = false function move () if ( Door == false ) then moveObject (TheDoor,1000,96.699996948242,1924.9999511719,18.89999961853) Door = true else moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) Door = false end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do bindKey (player, "m", "down", move ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "m", "down", move ) end ) Link to comment
#1Mr.AmeeD Posted September 2, 2015 Author Share Posted September 2, 2015 مشششكور خوي بس استفسار بسيط الحين هو يفتح ع اليمين كيف اخليه لفوق + يعطيك العافيةة ي سفاح <3 Link to comment
iMr.SFA7 Posted September 2, 2015 Share Posted September 2, 2015 مشششكور خوي بس استفسار بسيط الحين هو يفتح ع اليمين كيف اخليه لفوق + يعطيك العافيةة ي سفاح <3 الله يعآفيككـ ذذذذ آذآ تبيها فوق غير الآحدآثيات EDIT : هذآ هو سويته لككـ فوق ذذذذ -- # Server Side : TheDoor = createObject (17951 ,96.699996948242,1920.6999511719,18.89999961853 ,0,0,0) Door = false function move () if ( Door == false ) then moveObject (TheDoor,1000,96.699996948242,1920.9999111719,22.89999961853) Door = true else moveObject (TheDoor,1000,96.699996948242,1920.6999511719,18.89999961853) Door = false end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do bindKey (player, "m", "down", move ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "m", "down", move ) end ) Link to comment
#1Mr.AmeeD Posted September 2, 2015 Author Share Posted September 2, 2015 يعطيك العافيةة <3 Link to comment
iMr.SFA7 Posted September 2, 2015 Share Posted September 2, 2015 يعطيك العافيةة <3 الله يعآفيككـ 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