AhmeD~9MoD Posted July 24, 2013 Share Posted July 24, 2013 السلام عليكم ابغى الزر الاول ينشئ للاعب سيارة و ينقله لها ... #يسوي ترايقر للسيرفر ابغى اخلي الماركر الاول يظهر اللوحة الماركر الثاني عند لمسه ينشئ ماركر و يختفي ومن الثاني إلى الخامس نفس الشي بس اللهم اسم الماركر و الاحداثيات تختلف وابغاه من الثاني إلى الخامس يسوي ترايقر للسيرفر . ويعطي اللاعب فلوس و يظهر كلام في الشات و السادس ينهي كلشي " المهمة " اعرف ان الكود ممكن يكون شوي معقد او مو مفهوم كلنت addEventHandler("onClientGUIClick", root, function () if source == GUIEditor.button[1] then triggerServerEvent ( "create", getLocalPlayer() ) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) local marker1 = createMarker ( 2322.1096191406, -2739.4792480469, -0.55000001192093 ) setMarkerType ( marker1 , "cylinder" ) setMarkerColor ( marker1, 255, 0, 0, 255 ) setMarkerSize ( marker1, 1 ) elseif source == GUIEditor.button[2] then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end ) addEventHandler( "onClientMarkerHit", localPlayer, function( ) if ( source == marker ) then guiSetVisible ( GUIEditor.window[1], true ) showCursor ( true ) end end ) addEventHandler( "onClientMarkerHit", marker1 , function( hitElement ) if hitElement == localPlayer then local marker2 = createMarker ( 2104.2722167969, -2822.1376953125, -0.55000001192093 ) setMarkerType ( marker2 , "cylinder" ) setMarkerColor ( marker2, 255, 0, 0, 255 ) setMarkerSize ( marker2, 1 ) triggerServerEvent ( "give1", getLocalPlayer() ) destroyElement(marker1) end end ) addEventHandler( "onClientMarkerHit", marker2 , function( hitElement ) if hitElement == localPlayer then local marker3 = createMarker (1795.2196044922, -2839.7998046875,-0.55000001192093) setMarkerType ( marker3 , "cylinder" ) setMarkerColor ( marker3, 255, 0, 0, 255 ) setMarkerSize ( marker3, 1 ) triggerServerEvent ( "give2", getLocalPlayer() ) destroyElement(marker2) end end ) addEventHandler( "onClientMarkerHit", marker3 , function( hitElement ) if hitElement == localPlayer then local marker4 = createMarker ( 1280.1297607422, -2719.9506835938, -0.55000001192093) setMarkerType ( marker4 , "cylinder" ) setMarkerColor ( marker4, 255, 0, 0, 255 ) setMarkerSize ( marker4, 1 ) triggerServerEvent ( "give3", getLocalPlayer() ) destroyElement(marker3) end end ) addEventHandler( "onClientMarkerHit", marker4, function( hitElement ) if hitElement == localPlayer then local marker5 = createMarker ( 973.28326416016, -2298.9453125, -0.55000001192093 ) setMarkerType ( marker5 , "cylinder" ) setMarkerColor ( marker5, 255, 0, 0, 255 ) setMarkerSize ( marker5, 1 ) triggerServerEvent ( "give4", getLocalPlayer() ) destroyElement(marker4) end end ) addEventHandler( "onClientMarkerHit", marker5 , function( hitElement ) if hitElement == localPlayer then local marker6 = createMarker ( 587.72229003906, -1917.4465332031, 0.032471179962158 ) setMarkerType ( marker6 , "cylinder" ) setMarkerSize ( marker6, 1 ) setMarkerColor ( marker6, 255, 0, 0, 255 ) triggerServerEvent ( "give5", getLocalPlayer() ) destroyElement(marker5) end end ) addEventHandler( "onClientMarkerHit", marker6 , function( hitElement ) if hitElement == localPlayer then triggerServerEvent ( "give6", getLocalPlayer() ) destroyElement(marker6) end end ) سيرفر vehicle = {} addEvent("create", true) addEventHandler("create", root, function() vehicle[source] = createVehicle ( 595, 2324.4973144531, -2640.1005859375, 0.21274945139885) warpPedIntoVehicle(source, vehicle[source]) end ) addEvent ( "give1", root addEventHandler( "give1", root , givePlayerMoney ( source , 200 ) outputChatBox("عليك الذهاب لرمز الدائرة الحمراء في الماب الان",255,0,0,source) end ) addEvent ( "give2", root addEventHandler( "give2", root , givePlayerMoney ( source , 200 ) outputChatBox("عليك الذهاب لرمز الدائرة الحمراء في الماب الان",255,0,0,source) end ) addEvent ( "give3", root addEventHandler( "give3", root , givePlayerMoney ( source , 200 ) outputChatBox("عليك الذهاب لرمز الدائرة الحمراء في الماب الان",255,0,0,source) end ) addEvent ( "give4", root addEventHandler( "give4", root , givePlayerMoney ( source , 200 ) outputChatBox("عليك الذهاب لرمز الدائرة الحمراء في الماب الان",255,0,0,source) end ) addEvent ( "give5", root addEventHandler( "give5", root , givePlayerMoney ( source , 200 ) outputChatBox("عليك الذهاب لرمز الدائرة الحمراء في الماب الان",255,0,0,source) end ) addEvent ( "give6", root addEventHandler( "give6", root , givePlayerMoney ( source , 10000 ) outputChatBox("لقد انهيت مهمة سائق الطراد !! مبروك 10000 $",255,0,0,source) end ) وتحياتي #~ Link to comment
فاّرس Posted July 24, 2013 Share Posted July 24, 2013 نفسي افهم يعني هذا كود ولا هريسه مثل ما قال تابل؟ وممكن تقولي الحكمه من انك تسوي ماركر وتحذفه ؟ يعني بيكون بنفس الوقت اصلا يعني ما بيظهر Link to comment
AhmeD~9MoD Posted July 24, 2013 Author Share Posted July 24, 2013 addEventHandler( "onClientMarkerHit", marker1 , إذا لمس الماركر راح يختفي الماركر -.- Link to comment
فاّرس Posted July 24, 2013 Share Posted July 24, 2013 اظن إني فهمتك ذذ, -- Client Side # addEventHandler("onClientGUIClick", root, function () if source == GUIEditor.button[1] then triggerServerEvent ( "create",localPlayer) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) elseif source == GUIEditor.button[2] then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end ) local marker1 = createMarker ( 2322.1096191406, -2739.4792480469, -0.55000001192093 ) setMarkerType ( marker1 , "cylinder" ) setMarkerColor ( marker1, 255, 0, 0, 255 ) setMarkerSize ( marker1, 1 ) addEventHandler('onClientMarkerHit',root, function(player) if player == localPlayer then if source == marker1 then guiSetVisible(GUIEditor.window[1],true) showCursor(true) local marker2 = createMarker (...) setMarkerType ( marker2 , "cylinder" ) setMarkerColor ( marker2, 255, 0, 0, 255 ) setMarkerSize ( marker2, 1 ) triggerServerEvent ( "give1",localPlayer) destroyElement(marker1) elseif source == marker2 then local marker3 = createMarker(...) setMarkerType ( marker3 , "cylinder" ) setMarkerColor ( marker3, 255, 0, 0, 255 ) setMarkerSize ( marker3, 1 ) triggerServerEvent ( "give2",localPlayer) destroyElement(marker2) elseif source == marker3 then local marker4 = createMarker(...) setMarkerType ( marker4 , "cylinder" ) setMarkerColor ( marker4, 255, 0, 0, 255 ) setMarkerSize ( marker4, 1 ) triggerServerEvent ( "give3",localPlayer) destroyElement(marker3) elseif source == marker4 then local marker5 = createMarker(...) setMarkerType ( marker5 , "cylinder" ) setMarkerColor ( marker5, 255, 0, 0, 255 ) setMarkerSize ( marker5, 1 ) triggerServerEvent ( "give4",localPlayer) destroyElement(marker4) elseif source == marker5 then local marker6 = createMarker (...) setMarkerType ( marker6 , "cylinder" ) setMarkerSize ( marker6, 1 ) setMarkerColor ( marker6, 255, 0, 0, 255 ) triggerServerEvent ( "give5",localPlayer) destroyElement(marker5) elseif source == marker6 then triggerServerEvent ( "give6",localPlyaer) destroyElement(marker6) end end end ) -- Server Side # vehicle = {} addEvent('create',true) addEventHandler('create',root, function() if isElement(vehicle[client]) then destroyElement(vehicle[client]) vehicle[client] = nil end vehicle[client] = createVehicle(595, 2324.4973144531, -2640.1005859375, 0.21274945139885) warpPedIntoVehicle(client,vehicle[source]) end ) addEvent('give1',true) addEventHandler('give1',root, function() givePlayerMoney ( client , 200 ) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give2',true) addEventHandler('give2',root, function() givePlayerMoney (client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give3',true) addEventHandler('give3',root, function() givePlayerMoney (client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give4',true) addEventHandler('give4',root, function() givePlayerMoney(client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give5',true) addEventHandler('give5',root, function() givePlayerMoney (client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent ('give6',true) addEventHandler('give6',root, function() givePlayerMoney(client,10000) outputChatBox('لقد انهيت مهمة سائق الطراد !! مبروك 10000 $',client,255,0,0,true) end ) جرب ورد لي خبر ذذ لاتنسى تغير الماركر اقصد النقاط ذذ Link to comment
AhmeD~9MoD Posted July 24, 2013 Author Share Posted July 24, 2013 اظن إني فهمتك ذذ,-- Client Side # addEventHandler("onClientGUIClick", root, function () if source == GUIEditor.button[1] then triggerServerEvent ( "create",localPlayer) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) elseif source == GUIEditor.button[2] then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end ) local marker1 = createMarker ( 2322.1096191406, -2739.4792480469, -0.55000001192093 ) setMarkerType ( marker1 , "cylinder" ) setMarkerColor ( marker1, 255, 0, 0, 255 ) setMarkerSize ( marker1, 1 ) addEventHandler('onClientMarkerHit',root, function(player) if player == localPlayer then if source == marker1 then guiSetVisible(GUIEditor.window[1],true) showCursor(true) local marker2 = createMarker (...) setMarkerType ( marker2 , "cylinder" ) setMarkerColor ( marker2, 255, 0, 0, 255 ) setMarkerSize ( marker2, 1 ) triggerServerEvent ( "give1",localPlayer) destroyElement(marker1) elseif source == marker2 then local marker3 = createMarker(...) setMarkerType ( marker3 , "cylinder" ) setMarkerColor ( marker3, 255, 0, 0, 255 ) setMarkerSize ( marker3, 1 ) triggerServerEvent ( "give2",localPlayer) destroyElement(marker2) elseif source == marker3 then local marker4 = createMarker(...) setMarkerType ( marker4 , "cylinder" ) setMarkerColor ( marker4, 255, 0, 0, 255 ) setMarkerSize ( marker4, 1 ) triggerServerEvent ( "give3",localPlayer) destroyElement(marker3) elseif source == marker4 then local marker5 = createMarker(...) setMarkerType ( marker5 , "cylinder" ) setMarkerColor ( marker5, 255, 0, 0, 255 ) setMarkerSize ( marker5, 1 ) triggerServerEvent ( "give4",localPlayer) destroyElement(marker4) elseif source == marker5 then local marker6 = createMarker (...) setMarkerType ( marker6 , "cylinder" ) setMarkerSize ( marker6, 1 ) setMarkerColor ( marker6, 255, 0, 0, 255 ) triggerServerEvent ( "give5",localPlayer) destroyElement(marker5) elseif source == marker6 then triggerServerEvent ( "give6",localPlyaer) destroyElement(marker6) end end end ) -- Server Side # vehicle = {} addEvent('create',true) addEventHandler('create',root, function() if isElement(vehicle[client]) then destroyElement(vehicle[client]) vehicle[client] = nil end vehicle[client] = createVehicle(595, 2324.4973144531, -2640.1005859375, 0.21274945139885) warpPedIntoVehicle(client,vehicle[source]) end ) addEvent('give1',true) addEventHandler('give1',root, function() givePlayerMoney ( client , 200 ) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give2',true) addEventHandler('give2',root, function() givePlayerMoney (client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give3',true) addEventHandler('give3',root, function() givePlayerMoney (client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give4',true) addEventHandler('give4',root, function() givePlayerMoney(client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent('give5',true) addEventHandler('give5',root, function() givePlayerMoney (client,200) outputChatBox('عليك الذهاب لرمز الدائرة الحمراء في الماب الان',client,255,0,0,true) end ) addEvent ('give6',true) addEventHandler('give6',root, function() givePlayerMoney(client,10000) outputChatBox('لقد انهيت مهمة سائق الطراد !! مبروك 10000 $',client,255,0,0,true) end ) جرب ورد لي خبر ذذ لاتنسى تغير الماركر اقصد النقاط ذذ مافهمتني بشكل صحيح على كل حال مشكور بحاول اعدله واسويه حسب طلبي وبرد لك خبر Link to comment
فاّرس Posted July 24, 2013 Share Posted July 24, 2013 الي فهمته انك تبي اذا ضغط الزر يعطيه سياره , واذا لمس الماركر الاول تطلع النافذه , واذا لمس الماركر الاول يطلع الماركر الثاني ويختفي الاول وكذا, ومع كل ماركر تريقر , صحيح ولا انا غلطان؟ Link to comment
AhmeD~9MoD Posted July 24, 2013 Author Share Posted July 24, 2013 كودك الماركر الاول و الثاني يطلع , اما الباقي كللللللللهم مايطلعون شف بعد التعديل تقدر بس تصححه تخليهم يطلعون .. + لكل ماركر بلب كلنت كاااااااامل GUIEditor = { button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(193, 241, 381, 78, "مهمة سائق الطراد", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.button[1] = guiCreateButton(9, 19, 158, 42, "دخول المهمة", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(213, 19, 158, 42, "رفض المهمة واغلاق النافذة", false, GUIEditor.window[1]) end ) guiSetVisible ( GUIEditor.window[1], false ) addEventHandler("onClientGUIClick", root, function () if source == GUIEditor.button[1] then triggerServerEvent ( "create",localPlayer) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) elseif source == GUIEditor.button[2] then guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end ) local marker = createMarker ( 2285.7407226563, -2424.4553222656, 3 ) setMarkerType ( marker , "cylinder" ) setMarkerColor ( marker, 255, 0, 0, 255 ) setMarkerSize ( marker, 1 ) bilp = createBlip ( 2285.7407226563, -2424.4553222656, 3 ) setBlipIcon ( bilp , 9 ) local marker1 = createMarker ( 2322.1096191406, -2739.4792480469, -0.55000001192093 ) setMarkerType ( marker1 , "cylinder" ) setMarkerColor ( marker1, 255, 0, 0, 255 ) setMarkerSize ( marker1, 5 ) addEventHandler('onClientMarkerHit',root, function(player) if player == localPlayer then if source == marker then guiSetVisible(GUIEditor.window[1],true) showCursor(true) local marker2 = createMarker (2104.2722167969, -2822.1376953125, -0.55000001192093 ) setMarkerType ( marker2 , "cylinder" ) setMarkerColor ( marker2, 255, 0, 0, 255 ) setMarkerSize ( marker2, 5 ) bilp2 = createBlip (2104.2722167969, -2822.1376953125, -0.55000001192093 ) setBlipIcon ( bilp2 , 9 ) elseif source == marker1 then triggerServerEvent ( "give1",localPlayer) elseif source == marker2 then local marker3 = createMarker(1795.2196044922, -2839.7998046875,-0.55000001192093) setMarkerType ( marker3 , "cylinder" ) setMarkerColor ( marker3, 255, 0, 0, 255 ) setMarkerSize ( marker3, 5 ) bilp3= createBlip (1795.2196044922, -2839.7998046875,-0.55000001192093) setBlipIcon ( bilp3 , 9 ) triggerServerEvent ( "give2",localPlayer) destroyElement(marker2) elseif source == marker3 then local marker4 = createMarker( 1280.1297607422, -2719.9506835938, -0.55000001192093) setMarkerType ( marker4 , "cylinder" ) setMarkerColor ( marker4, 255, 0, 0, 255 ) setMarkerSize ( marker4, 5 ) bilp4 = createBlip ( 1280.1297607422, -2719.9506835938, -0.55000001192093) setBlipIcon ( bilp4, 9 ) triggerServerEvent ( "give3",localPlayer) destroyElement(marker3) elseif source == marker4 then local marker5 = createMarker( 973.28326416016, -2298.9453125, -0.55000001192093 ) setMarkerType ( marker5 , "cylinder" ) setMarkerColor ( marker5, 255, 0, 0, 255 ) setMarkerSize ( marker5, 5 ) triggerServerEvent ( "give4",localPlayer) destroyElement(marker4) bilp5 = createBlip ( 973.28326416016, -2298.9453125, -0.55000001192093 ) setBlipIcon ( bilp5 , 9 ) elseif source == marker5 then local marker6 = createMarker ( 587.72229003906, -1917.4465332031, 0.032471179962158 ) setMarkerType ( marker6 , "cylinder" ) setMarkerSize ( marker6, 5 ) setMarkerColor ( marker6, 255, 0, 0, 255 ) bilp6 = createBlip ( 587.72229003906, -1917.4465332031, 0.032471179962158 ) setBlipIcon ( bilp6 , 9 ) triggerServerEvent ( "give5",localPlayer) destroyElement(marker5) elseif source == marker6 then triggerServerEvent ( "give6",localPlayer) destroyElement(marker6) end end end ) Link to comment
فاّرس Posted July 24, 2013 Share Posted July 24, 2013 مدري وش المشكله عندك لكن شيل اللوكل local marker.... Link to comment
AhmeD~9MoD Posted July 25, 2013 Author Share Posted July 25, 2013 ضبط ^ ثــــــــــآنكس ذا بـــــــيست Link to comment
فاّرس Posted July 25, 2013 Share Posted July 25, 2013 ضبط ^ثــــــــــآنكس ذا بـــــــيست حيآك الله 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