EdeN Posted September 19, 2012 Share Posted September 19, 2012 ابي احط باب اضغط تاب ينفك الطللب الثاني ابي احط دائره اذا دخله احد يطلع شوب عندي مشكله لمن اسوي مود ماتطلع الماوس ؟؟ ارجو المساعده Link to comment
==>ҭᾄlᾄl Posted September 19, 2012 Share Posted September 19, 2012 الطلب الاول gate = createObject(id,x,y,z,90,0,0) --id = رقم الاوبجكت x,y,x= احداثيات البوابه function opendoor() --- وظيفة moveObject (gate, 5000, 4060.9077148438,-1819.9403076172,29.235511779785 ) --- تحريك البوابة الى الاحداثيات التالية y,x,z end-- اغلاق bindKey ( "tab", "down", opendoor ) ----- وضع مفتاح تحريك البوابة هو تاب function closedoor() -- وظيفة moveObject (gate, 5000, 4060.9077148438,-1819.9403076172,346.60443115234 ) --- تحريك البوابة الى الاحداثيات التالية لاغلاقها end -- اغلاق bindKey ( "tab", "down", closedoor ) --- وضع مفتاح التحريك البوابة هو تاب الطلب الثاني client: function showGUI () guiSetVisible (lol,true) showCursor (true) end addEvent ("showGUI",true) addEventHandler ("showGUI",getRootElement(),showGUI) server: marker1 = createMarker(اPosX,PosY,PosZ,"cylinder",1.5,0,0,225,100) setElementInterior (marker1,0) function showGUI (jugador) if (source == marker1) then triggerClientEvent (jugador,"showGUI",getRootElement(),jugador) end end addEventHandler ("onMarkerHit",getRootElement(),showGUI) Link to comment
./BlackBird# Posted September 19, 2012 Share Posted September 19, 2012 showCursor (true) هذا يطلع الماوس client:- function marker(hitElement) if getElementType(hitElement) == "player" then if not guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end end addEventHandler("onClientMarkerHit", theMarker, marker) هذا لما يدخل الماركر يطلع النافذة Link to comment
===[PRO]=== Posted September 19, 2012 Share Posted September 19, 2012 عندي مشكله لمن اسوي مود ماتطلع الماوس ؟؟ showCursor(true) Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 الان انا حطيت الي طلبته لكن مايفك الباب شوف الخطاء وصلحه gate = createObject(id,x,y,z,0,0,270) function opendoor() moveObject (gate, 5000, 1588.5999755859,-1638,17.700000762939 ) end bindKey ( "tab", "down", opendoor ) function closedoor() moveObject (gate, 5000, 1588.5999755859,-1638,13.89999961853 ) end bindKey ( "tab", "down", closedoor ) Link to comment
===[PRO]=== Posted September 19, 2012 Share Posted September 19, 2012 gate = createObject(id,x,y,z,0,0,270) ما وضعت الاحداثيات و اي دي Link to comment
./BlackBird# Posted September 19, 2012 Share Posted September 19, 2012 gate = createObject(980,2482.7,-1687.8,15.3) function opendoor() if i then moveObject (gate, 1500, 2482.7, -1687.8, 15.3) else moveObject (gate, 1500, 2482.7,-1687.8, 17.3) end i = not i end bindKey("tab", "down", opendoor) عدل الاحداثيات Link to comment
TAPL Posted September 19, 2012 Share Posted September 19, 2012 https://forum.multitheftauto.com/viewtopic.php?f=119&t=47615#p472317 Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 gate = createObject(980,2482.7,-1687.8,15.3) function opendoor() if i then moveObject (gate, 1500, 2482.7, -1687.8, 15.3) else moveObject (gate, 1500, 2482.7,-1687.8, 17.3) end i = not i end bindKey("tab", "down", opendoor) عدل الاحداثيات gate = createObject(980,2482.7,-1687.8,15.3) function opendoor() if i then moveObject (gate, 1500, 1588.5999755859, -1638, 17.700000762939) else moveObject (gate, 1500, 1588.5999755859,-1638, -1638,13.89999961853) end i = not i end bindKey("tab", "down", opendoor) هذا الكود ولا صار شيء لا يفك ولا شوف وش الحل Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 1588.5999755859, -1638, 17.700000762939 هذي الاحداثيات اذا ممكن انتم سووولي Link to comment
abu5lf Posted September 19, 2012 Share Posted September 19, 2012 server-side addEventHandler ( 'onResourceStart', getRootElement(), function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 17.700000762939 ) local marker = createMarker ( 1588.5999755859, -1638, 17.700000762939, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 17.700000762939 ) else moveObject ( object, 1588.5999755859, -1638, 19.700000762939 ) end end i = not i end Link to comment
TAPL Posted September 19, 2012 Share Posted September 19, 2012 server-side addEventHandler ( 'onResourceStart', getRootElement(), function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 17.700000762939 ) local marker = createMarker ( 1588.5999755859, -1638, 17.700000762939, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 17.700000762939 ) else moveObject ( object, 1588.5999755859, -1638, 19.700000762939 ) end end i = not i end addEventHandler ( 'onResourceStart', resourceRoot, function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 17.700000762939 ) local marker = createMarker ( 1588.5999755859, -1638, 17.700000762939, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 17.700000762939 ) else moveObject ( object, 2500, 1588.5999755859, -1638, 19.700000762939 ) end i = not i end end Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 server-side addEventHandler ( 'onResourceStart', getRootElement(), function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 17.700000762939 ) local marker = createMarker ( 1588.5999755859, -1638, 17.700000762939, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 17.700000762939 ) else moveObject ( object, 1588.5999755859, -1638, 19.700000762939 ) end end i = not i end addEventHandler ( 'onResourceStart', resourceRoot, function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 17.700000762939 ) local marker = createMarker ( 1588.5999755859, -1638, 17.700000762939, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 17.700000762939 ) else moveObject ( object, 2500, 1588.5999755859, -1638, 19.700000762939 ) end i = not i end end ماشتغل Link to comment
abu5lf Posted September 19, 2012 Share Posted September 19, 2012 الكود سيرفر وتأكد من الأحداثيات Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 الكود سيرفر وتأكد من الأحداثيات متاكد Link to comment
TAPL Posted September 19, 2012 Share Posted September 19, 2012 addEventHandler ( 'onResourceStart', resourceRoot, function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 15) local marker = createMarker ( 1588.5999755859, -1638, 15, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 15 ) else moveObject ( object, 2500, 1588.5999755859, -1638, 20) end i = not i end end Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 addEventHandler ( 'onResourceStart', resourceRoot, function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 15) local marker = createMarker ( 1588.5999755859, -1638, 15, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 15 ) else moveObject ( object, 2500, 1588.5999755859, -1638, 20) end i = not i end end تابل ماتغير شي نفسه المشكله Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 حط الميتا <meta> <info author="===7MoDy" version="1.0" /> <script src="Cilent.lua" type="client" /> </meta> Link to comment
TAPL Posted September 19, 2012 Share Posted September 19, 2012 الكود سيرفر وتأكد من الأحداثيات متاكد "===7MoDy" version="1.0" /> Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 الكود سيرفر وتأكد من الأحداثيات متاكد "===7MoDy" version="1.0" /> مشكور تابل ماقصرت Link to comment
EdeN Posted September 19, 2012 Author Share Posted September 19, 2012 ممكن تساعدوني صج اني طولته سامحوني ابي احط دائره اذا دخله احد يطلع شوب حط في الفراغات المطلوبه بلعربي وش حقه client: function showGUI () guiSetVisible (lol,true) showCursor (true) end addEvent ("showGUI",true) addEventHandler ("showGUI",getRootElement(),showGUI) server: marker1 = createMarker(اPosX,PosY,PosZ,"cylinder",1.5,0,0,225,100) setElementInterior (marker1,0) function showGUI (jugador) if (source == marker1) then triggerClientEvent (jugador,"showGUI",getRootElement(),jugador) end end addEventHandler ("onMarkerHit",getRootElement(),showGUI) Link to comment
TAPL Posted September 19, 2012 Share Posted September 19, 2012 (كلينت (فقط function marker(hitElement) if getElementType(hitElement) == "player" then -- إذا كان الي خش الماركر لاعب if not guiGetVisible(أسم النافذه هنا) then -- إذا كانت النافذه غير ظاهره guiSetVisible(أسم النافذه هنا, true) -- أظهار النافذه showCursor(true) -- أظهار الماوس end end end addEventHandler("onClientMarkerHit", اسم الماركر هنا, marker) وكود البوابه لا تنسى تحط ذا عشان لما يخش لاعب يحط له زر تاب addEventHandler('onPlayerJoin', root, function () bindKey ( source, 'tab', 'down', AlBab ) end) Link to comment
EdeN Posted September 20, 2012 Author Share Posted September 20, 2012 ممكن تصحح لي في اي خطا المارك شبكته مع الشوب بس مادري شنو فيه مايطلع في الدائره يشتغل مثل الشوبات الي مشبوكه زر GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(0.3404,0.237,0.3558,0.4167,"شووب زومبي",true) GUIEditor_TabPanel[1] = guiCreateTabPanel(106,256,5,5,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) GUIEditor_TabPanel[2] = guiCreateTabPanel(11,19,466,292,false,GUIEditor_Window[1]) GUIEditor_Tab[2] = guiCreateTab("Shop-1#",GUIEditor_TabPanel[2]) GUIEditor_Button[1] = guiCreateButton(12,60,76,22,"400",false,GUIEditor_Tab[2]) GUIEditor_Image[1] = guiCreateStaticImage(13,14,75,45,"images/ak47.png",false,GUIEditor_Tab[2]) GUIEditor_Button[2] = guiCreateButton(105,60,76,22,"150",false,GUIEditor_Tab[2]) GUIEditor_Image[2] = guiCreateStaticImage(106,17,79,41,"images/deagle.png",false,GUIEditor_Tab[2]) GUIEditor_Button[3] = guiCreateButton(192,60,76,22,"1500",false,GUIEditor_Tab[2]) GUIEditor_Image[3] = guiCreateStaticImage(191,19,82,42,"images/grenade.png",false,GUIEditor_Tab[2]) GUIEditor_Button[4] = guiCreateButton(278,60,76,22,"200",false,GUIEditor_Tab[2]) GUIEditor_Image[4] = guiCreateStaticImage(280,19,78,43,"images/mp5.png",false,GUIEditor_Tab[2]) GUIEditor_Button[5] = guiCreateButton(369,60,76,22,"250",false,GUIEditor_Tab[2]) GUIEditor_Image[5] = guiCreateStaticImage(370,22,80,39,"images/m4.png",false,GUIEditor_Tab[2]) GUIEditor_Button[6] = guiCreateButton(11,209,76,22,"200",false,GUIEditor_Tab[2]) GUIEditor_Image[6] = guiCreateStaticImage(11,158,81,54,"images/pistol.png",false,GUIEditor_Tab[2]) GUIEditor_Button[7] = guiCreateButton(98,209,76,22,"100",false,GUIEditor_Tab[2]) GUIEditor_Image[7] = guiCreateStaticImage(95,162,84,50,"images/pistol-s.png",false,GUIEditor_Tab[2]) GUIEditor_Button[8] = guiCreateButton(98,209,76,22,"100",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(192,209,76,22,"255",false,GUIEditor_Tab[2]) GUIEditor_Image[8] = guiCreateStaticImage(192,168,80,45,"images/shotgun.png",false,GUIEditor_Tab[2]) GUIEditor_Button[10] = guiCreateButton(278,208,76,22,"250",false,GUIEditor_Tab[2]) GUIEditor_Image[9] = guiCreateStaticImage(280,171,77,40,"images/sniper.png",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(369,208,76,22,"650",false,GUIEditor_Tab[2]) GUIEditor_Image[10] = guiCreateStaticImage(366,174,81,37,"images/spaz-12.png",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Shop-2#",GUIEditor_TabPanel[2]) GUIEditor_Button[12] = guiCreateButton(10,59,71,20,"450",false,GUIEditor_Tab[3]) GUIEditor_Image[11] = guiCreateStaticImage(10,15,70,46,"images/tec-9.png",false,GUIEditor_Tab[3]) GUIEditor_Button[13] = guiCreateButton(87,59,71,20,"300",false,GUIEditor_Tab[3]) GUIEditor_Image[12] = guiCreateStaticImage(87,22,73,40,"images/uzi.png",false,GUIEditor_Tab[3]) GUIEditor_Label[1] = guiCreateLabel(233,7,207,240,"By:7MoDy",false,GUIEditor_Tab[3]) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(8,200,216,39,"لسيرفر الزومبي",false,GUIEditor_Tab[3]) function BuyWeapon(money,id,ammo,name) local m1 = getPlayerMoney(getLocalPlayer()) if ( m1 >= money ) then takePlayerMoney(money) triggerServerEvent("onBuy",getLocalPlayer(),id,ammo) outputChatBox("* You Are Bought " .. name .. "",0,255,0,true) else outputChatBox("* You Don't Have Enough Money",255,0,0,true) end end addEventHandler("onClientGUIClick",getRootElement(), function () if ( source == GUIEditor_Button[1] ) then BuyWeapon(1000,30,1000,"AK47") elseif ( source == GUIEditor_Button[5] ) then BuyWeapon(1500,31,1000,"M4") elseif ( source == GUIEditor_Button[2] ) then BuyWeapon(150,24,950,"Deagle") elseif ( source == GUIEditor_Button[3] ) then BuyWeapon(1500,16,20,"grenade") elseif ( source == GUIEditor_Button[4] ) then BuyWeapon(200,29,500,"mp5") end end ) addEvent("onBuy",true) addEventHandler("onBuy",getRootElement(), function (id,ammo) giveWeapon(source,id,ammo) end ) function marker(hitElement) if getElementType(hitElement) == "player" then if not guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end end addEventHandler("onClientMarkerHit", mArker22, marker) 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