max-mohammed Posted January 11, 2014 Share Posted January 11, 2014 شباب انا عندي كود لما ادخل ماركر تطلع لوحة اللوحة فيها اديت لرقم سري وفيها زر موافق لو ادخلت 12345 في الايديت وضغط موافق يسوي تحريك للاوبجيكت بس الكود مو راضي يشتغل والماركر والاوبجيكت ما يجون ليش؟؟؟ سيرفر marker = createMarker ( 2462.1999511719, -1656.4000244141, 12.300000190735, "cylinder", 1, 0, 255, 0, 255 ) Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function markerHit(hitElement) triggerClientEvent ("gui", getRootElement(), hitElement) end addEventHandler( "onMarkerHit", marker, markerHit ) function moveop() moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) كلنت wnd = guiCreateWindow(360, 306, 267, 136, "مقر", false) guiCreateLabel(50, 28, 225, 49, "ادخل كلمة المرور لفتح البوابة:", false, wnd) text = guiCreateEdit(28, 61, 221, 37, "", false, wnd) guiEditSetMasked(text, true) button = guiCreateButton(100, 108, 64, 18, "موافق", false, wnd) function wnd1 () guiSetVisible(wnd,true) showCursor(true) guiSetText(text,"") end addEvent("gui", true ) addEventHandler("gui", getRootElement(), wnd1) addEventHandler ("onClientGUIClick", button, function () if guiGetText(text, "12345") then guiSetVisible(wnd,false) showCursor(false) triggerServerEvent ("mvmarker", localPlayer) outputChatBox ("رقم سري صحيح",0,255,0) else guiSetVisible(wnd,false) showCursor(false) outputChatBox ("رقم سري خاطئ",255,0,0) end end ) addEventHandler("onClientResourceStart",root, function() guiSetVisible(wnd,false) end ) انا اعتقد ان المشكلة من ملف سيرفر Link to comment
The Killer Posted January 11, 2014 Share Posted January 11, 2014 wnd = guiCreateWindow(360, 306, 267, 136, "مقر", false) guiCreateLabel(50, 28, 225, 49, "ادخل كلمة المرور لفتح البوابة:", false, wnd) text = guiCreateEdit(28, 61, 221, 37, "", false, wnd) guiEditSetMasked(text, true) button = guiCreateButton(100, 108, 64, 18, "موافق", false, wnd) function wnd1 () guiSetVisible(wnd,true) showCursor(true) guiSetText(text,"") end addEvent("gui", true ) addEventHandler("gui", getRootElement(), wnd1) addEventHandler ("onClientGUIClick", button, function () if guiGetText(text) == "12345" then guiSetVisible(wnd,false) showCursor(false) triggerServerEvent ("mvmarker", localPlayer) outputChatBox ("رقم سري صحيح",0,255,0) else guiSetVisible(wnd,false) showCursor(false) outputChatBox ("رقم سري خاطئ",255,0,0) end end ) addEventHandler("onClientResourceStart",root, function() guiSetVisible(wnd,false) end ) Link to comment
max-mohammed Posted January 11, 2014 Author Share Posted January 11, 2014 بس المركر والاوبجيكت مو موجودين ملف سيفر فيه خطأ!!!!!!! Link to comment
The Killer Posted January 11, 2014 Share Posted January 11, 2014 غريبه لأني جربت الكود وشغال معي شكلك حاط السيرفر كلنت والكلنت سيرفر !! Link to comment
max-mohammed Posted January 11, 2014 Author Share Posted January 11, 2014 ضبط الكود بس لما المس الماركر ما تفتح الوحة ما يسير شيء لو لمست الماركر Link to comment
فاّرس Posted January 11, 2014 Share Posted January 11, 2014 وليه حاط الماركر سيرفر اصلا ؟ خليه كلينت Link to comment
max-mohammed Posted January 11, 2014 Author Share Posted January 11, 2014 بس ابي اذا انفك الباب ينصك بعد ثانيتين وين اضيف: setTimer(moveop,2000,1) وين اضيفه في ملف سيرفر Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function moveop() moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) وعلى فكرة حطيت كودات الماركر في كلنت واشتغل %100 Link to comment
فاّرس Posted January 11, 2014 Share Posted January 11, 2014 سوي تايمر يرجع الاوبجكت, setTimer moveObject Link to comment
max-mohammed Posted January 11, 2014 Author Share Posted January 11, 2014 سوي تايمر يرجع الاوبجكت, setTimer moveObject بصراحة مافهمت وين احط مكانه التايمر بس كذا صح؟ Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function moveop() th = moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) setTimer(th,2000,1) Link to comment
فاّرس Posted January 11, 2014 Share Posted January 11, 2014 داخل الوظيفه تخليه, Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function moveop() moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) setTimer(moveObject,2000,1,Object,1000,2500.8999023438,-1662.0999755859,12.300000190735) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) Link to comment
max-mohammed Posted January 11, 2014 Author Share Posted January 11, 2014 الكود ماضبط مارجع الاوبجيكت مكانه واف8 يقول \Server.lua:5 Bad argument @ 'moveObject' [Expected number at argument 5, got none] Link to comment
The Killer Posted January 12, 2014 Share Posted January 12, 2014 marker = createMarker ( 2462.2, -1656.4, 12.3, "cylinder", 1.3, 0, 255, 0, 255 ) Object = createObject ( 2951, 2462.9, -1656.7, 12.3, 0, 0, 88.75) function markerHit(hitElement) triggerClientEvent ("gui", getRootElement(), hitElement) end addEventHandler( "onMarkerHit", marker, markerHit ) function moveop() moveObject (Object, 1000, 2462.9, -1662.1, 12.3) setTimer (moveObject, 2500, 1, Object, 1000, 2462.9, -1656.7, 12.3) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) Link to comment
فاّرس Posted January 12, 2014 Share Posted January 12, 2014 ^ ليه الماركر سيرفر بما انه يجي كلينت اصلا -__-" + تحتاج تتحقق من اللاعب max-mohammed @ تأكد انك بدلت الاحداثيات الجديده local Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function moveop() moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) setTimer(moveObject,2000,1,Object,1000,x,y,z) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) x,y,z = الاحداثيات الي تبي الاوبجكت يروح لها Link to comment
max-mohammed Posted January 12, 2014 Author Share Posted January 12, 2014 ^ ليه الماركر سيرفر بما انه يجي كلينت اصلا -__-" + تحتاج تتحقق من اللاعب max-mohammed @ تأكد انك بدلت الاحداثيات الجديده local Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function moveop() moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) setTimer(moveObject,2000,1,Object,1000,x,y,z) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) x,y,z = الاحداثيات الي تبي الاوبجكت يروح لها شكراااااااااااااااااااااااااااااااااااااااااااااااااااااااااااا الكود اشتغل وزبط %100 والله كفوو Link to comment
The Killer Posted January 13, 2014 Share Posted January 13, 2014 ^ ليه الماركر سيرفر بما انه يجي كلينت اصلا -__-" + تحتاج تتحقق من اللاعب اتحقق من الاعب ؟ خخخ ,, وش هو الي تحقق ؟ هذا باب يعني اكيد بيدخله لاعب او سياره !!!! Link to comment
فاّرس Posted January 13, 2014 Share Posted January 13, 2014 انا ما اشوف انه قال يبي اي المنت يدخل تفتح النافذه , الي واضح من الكود يبي للاعب مو للسياره -__-" Link to comment
The Killer Posted January 13, 2014 Share Posted January 13, 2014 طيب انا ما اشوف انك تحققت من الاعبب -,- Link to comment
فاّرس Posted January 13, 2014 Share Posted January 13, 2014 ليه تشوفني حطيت ماركر اصلا؟ Link to comment
The Killer Posted January 13, 2014 Share Posted January 13, 2014 اول شي الكود اصلا كان عنده هذا انا ما ضفت عليه شي ولا شي بس عدلت على حسب طلبه -,- marker = createMarker ( 2462.2, -1656.4, 12.3, "cylinder", 1.3, 0, 255, 0, 255 ) Object = createObject ( 2951, 2462.9, -1656.7, 12.3, 0, 0, 88.75) function markerHit(hitElement) triggerClientEvent ("gui", getRootElement(), hitElement) end addEventHandler( "onMarkerHit", marker, markerHit ) function moveop() moveObject (Object, 1000, 2462.9, -1662.1, 12.3) setTimer (moveObject, 2500, 1, Object, 1000, 2462.9, -1656.7, 12.3) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) يعني اذا يبي الاعب بس كان سوا تحقق ثاني شي وش الي ليه شايفني حاط الماركر اصلا ؟ Link to comment
فاّرس Posted January 13, 2014 Share Posted January 13, 2014 انت تقول , طيب انا ما اشوف انك تحققت من الاعبب -,- وانا رديت , ليه تشوفني حطيت ماركر اصلا؟ وهذا كودي , ^ ليه الماركر سيرفر بما انه يجي كلينت اصلا -__-" + تحتاج تتحقق من اللاعب max-mohammed @ تأكد انك بدلت الاحداثيات الجديده local Object = createObject ( 2951, 2462.8999023438, -1656.6999511719, 12.300000190735, 0, 0, 88.75) function moveop() moveObject (Object, 1000, 2462.8999023438, -1662.0999755859, 12.300000190735) setTimer(moveObject,2000,1,Object,1000,x,y,z) end addEvent("mvmarker", true ) addEventHandler("mvmarker", root, moveop) x,y,z = الاحداثيات الي تبي الاوبجكت يروح لها 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