baba Posted March 9, 2015 Share Posted March 9, 2015 سلام عليكم شباب كيفكم انشاء الله بخير ابي كود ماركر ادخل عليه تطلعلي لوحه انا مسوي لوحه وانا ابي يدخل على الماركر تطلع له الوحه ارجو التوضيح Link to comment
iMr.TZ[W]ER Posted March 9, 2015 Share Posted March 9, 2015 -- Events onClientMarkerHit --Functions guiSetVisible Link to comment
khalid-mks Posted March 9, 2015 Share Posted March 9, 2015 هادة مثال jobmarker = createMarker(1314,-1575,12,"cylinder",2,0,255,0) addEventHandler("onClientMarkerHit",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(jobwindow,true) showCursor(true) end end) وللحصول على امثلة ثانية https://forum.multitheftauto.com/viewto ... 48&t=40840 Link to comment
baba Posted March 9, 2015 Author Share Posted March 9, 2015 اذا ما فيها تعب تقدر تقلي وين تنحط عشان ما اتلخبط مثل الكود ذا outputChatBox( "#FFFF00===[HELPMANAGER BY -Marwan+PUNK]===",0,255,0,true ) outputChatBox( "#00FF00===[PRESS F9 TO OPEN IT]===",0,255,0,true ) localPlayer = getLocalPlayer() wnd_window = {} addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), function ( theResource ) --outputConsole( "wnd_showServerInfo called" ) --outputConsole( " source: ".. tostring( source ) ) --outputConsole( " resourceStarted: ".. tostring( theResource ) ) if source == getResourceRootElement( theResource ) then --outputConsole( " passed if: source == resource" ) local cmd = xmlLoadFile( "cmd.xml" ) local cmd1 = xmlNodeGetValue( cmd ) local member = xmlLoadFile( "member.xml" ) local member1 = xmlNodeGetValue( member ) local other = xmlLoadFile( "other.xml" ) local other1 = xmlNodeGetValue( other ) local server = xmlLoadFile( "server.xml" ) local server1 = xmlNodeGetValue( server ) wnd_create( cmd1, member1, other1, server1 ) end end ) function wnd_create( cmd, member, other, server ) GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Memo = {} GUIEditor_Image = {} window = guiCreateWindow(336,330,744,546,"★حياكم الله بسيرفر زومبي المملكة★",false) guiSetAlpha(window,1) guiWindowSetSizable(window,false) background = guiCreateStaticImage(0.0165,0.0549,0.9669,0.9191,"images/background.png",true,window) guiSetAlpha(background,1) guiSetProperty(background,"Disabled","true") GUIEditor_Image[1] = guiCreateStaticImage(0.0081,0.0023,0.0043,0.005,"images/logo.png",true,window) guiSetAlpha(GUIEditor_Image[1],1) guiSetProperty(GUIEditor_Image[1],"Disabled","true") GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0404,0.2457,0.921,0.6936,true,window) guiSetAlpha(GUIEditor_TabPanel[1],1) tabcmd = guiCreateTab("★قوانيــن السيرفر★",GUIEditor_TabPanel[1]) guiSetAlpha(tabcmd,1) GUIEditor_Memo[1] = guiCreateMemo(0.008,0.0231,0.984,0.9583,cmd,true,tabcmd) guiSetAlpha(GUIEditor_Memo[1],1) GUIEditor_Tab[1] = guiCreateTab("★شرح السيرفر★",GUIEditor_TabPanel[1]) guiSetAlpha(GUIEditor_Tab[1],1) GUIEditor_Memo[2] = guiCreateMemo(0.01,0.0324,0.98,0.9444,member,true,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Memo[2],1) GUIEditor_Tab[2] = guiCreateTab("صاحبين السيرفر",GUIEditor_TabPanel[1]) guiSetAlpha(GUIEditor_Tab[2],1) GUIEditor_Memo[3] = guiCreateMemo(0.008,0.0185,0.982,0.963,other,true,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Memo[2],1) GUIEditor_Tab[2] = guiCreateTab("تحياتنا",GUIEditor_TabPanel[1]) guiSetAlpha(GUIEditor_Tab[2],1) GUIEditor_Memo[4] = guiCreateMemo(0.008,0.0185,0.982,0.963,server,true,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Memo[4],1) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiMemoSetReadOnly(GUIEditor_Memo[2],true) guiMemoSetReadOnly(GUIEditor_Memo[3],true) guiMemoSetReadOnly(GUIEditor_Memo[4],true) end -- BIND THE TOUCH F9 function onresourceStart () bindKey ("F9", "down", showUserPanel) guiSetVisible (window, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function showUserPanel () getVisible = guiGetVisible (window) playerName = getPlayerName ( getLocalPlayer() ) if (getVisible == true) then guiSetVisible (window, false) showCursor (false) playSound("open.wav") end if (getVisible == false) then guiSetVisible (window, true) showCursor (true) playSound("open.wav") end end تقدر تعدلها لي؟ Link to comment
khalid-mks Posted March 9, 2015 Share Posted March 9, 2015 شووف الراابط الي فوق الامثلة كل كود جنبه ايش يسوي Link to comment
khalid-mks Posted March 9, 2015 Share Posted March 9, 2015 خخخ تبيهم يعدلو لك ما اظن راح يعدلو لك "الاصدقااء شعارهم هنا "اعتمد على نفسك Link to comment
baba Posted March 9, 2015 Author Share Posted March 9, 2015 يا حب رح اتعبك معي بس ولله مو فاهم شي اسمع تقدر تسويلي الكود الي فوق اعمله لي ماركر ادخله يطلع لي الوحه Link to comment
yazan Posted March 9, 2015 Share Posted March 9, 2015 outputChatBox( "#FFFF00===[HELPMANAGER BY -Marwan+PUNK]===",0,255,0,true ) outputChatBox( "#00FF00===[PRESS F9 TO OPEN IT]===",0,255,0,true ) localPlayer = getLocalPlayer() wnd_window = {} addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), function ( theResource ) --outputConsole( "wnd_showServerInfo called" ) --outputConsole( " source: ".. tostring( source ) ) --outputConsole( " resourceStarted: ".. tostring( theResource ) ) if source == getResourceRootElement( theResource ) then --outputConsole( " passed if: source == resource" ) local cmd = xmlLoadFile( "cmd.xml" ) local cmd1 = xmlNodeGetValue( cmd ) local member = xmlLoadFile( "member.xml" ) local member1 = xmlNodeGetValue( member ) local other = xmlLoadFile( "other.xml" ) local other1 = xmlNodeGetValue( other ) local server = xmlLoadFile( "server.xml" ) local server1 = xmlNodeGetValue( server ) wnd_create( cmd1, member1, other1, server1 ) end end ) function wnd_create( cmd, member, other, server ) GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Memo = {} GUIEditor_Image = {} window = guiCreateWindow(336,330,744,546,"★حياكم الله بسيرفر زومبي المملكة★",false) guiSetAlpha(window,1) guiWindowSetSizable(window,false) background = guiCreateStaticImage(0.0165,0.0549,0.9669,0.9191,"images/background.png",true,window) guiSetAlpha(background,1) guiSetProperty(background,"Disabled","true") GUIEditor_Image[1] = guiCreateStaticImage(0.0081,0.0023,0.0043,0.005,"images/logo.png",true,window) guiSetAlpha(GUIEditor_Image[1],1) guiSetProperty(GUIEditor_Image[1],"Disabled","true") GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0404,0.2457,0.921,0.6936,true,window) guiSetAlpha(GUIEditor_TabPanel[1],1) tabcmd = guiCreateTab("★قوانيــن السيرفر★",GUIEditor_TabPanel[1]) guiSetAlpha(tabcmd,1) GUIEditor_Memo[1] = guiCreateMemo(0.008,0.0231,0.984,0.9583,cmd,true,tabcmd) guiSetAlpha(GUIEditor_Memo[1],1) GUIEditor_Tab[1] = guiCreateTab("★شرح السيرفر★",GUIEditor_TabPanel[1]) guiSetAlpha(GUIEditor_Tab[1],1) GUIEditor_Memo[2] = guiCreateMemo(0.01,0.0324,0.98,0.9444,member,true,GUIEditor_Tab[1]) guiSetAlpha(GUIEditor_Memo[2],1) GUIEditor_Tab[2] = guiCreateTab("صاحبين السيرفر",GUIEditor_TabPanel[1]) guiSetAlpha(GUIEditor_Tab[2],1) GUIEditor_Memo[3] = guiCreateMemo(0.008,0.0185,0.982,0.963,other,true,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Memo[2],1) GUIEditor_Tab[2] = guiCreateTab("تحياتنا",GUIEditor_TabPanel[1]) guiSetAlpha(GUIEditor_Tab[2],1) GUIEditor_Memo[4] = guiCreateMemo(0.008,0.0185,0.982,0.963,server,true,GUIEditor_Tab[2]) guiSetAlpha(GUIEditor_Memo[4],1) guiMemoSetReadOnly(GUIEditor_Memo[1],true) guiMemoSetReadOnly(GUIEditor_Memo[2],true) guiMemoSetReadOnly(GUIEditor_Memo[3],true) guiMemoSetReadOnly(GUIEditor_Memo[4],true) end -- BIND THE TOUCH F9 function onresourceStart () bindKey ("F9", "down", showUserPanel) guiSetVisible (window, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function showUserPanel () getVisible = guiGetVisible (window) playerName = getPlayerName ( getLocalPlayer() ) if (getVisible == true) then guiSetVisible (window, false) showCursor (false) playSound("open.wav") end if (getVisible == false) then guiSetVisible (window, true) showCursor (true) playSound("open.wav") end end jobmarker = createMarker(1314,-1575,12,"cylinder",2,0,255,0) addEventHandler("onClientMarkerHit",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(window,true) showCursor(true) end end) عدل موقع المارك Link to comment
The Killer Posted March 10, 2015 Share Posted March 10, 2015 addEventHandler("onClientMarkerHit",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(window,true) showCursor(true) end end) lp = ? من وين معرفه ؟ Link to comment
baba Posted March 10, 2015 Author Share Posted March 10, 2015 سلام عليكم شكلي رح اتعبكم معي شويه يا شباب الكود الي عطتوني ايه ركبته على ذي الوحه --outputChatBox("F1 لاخذ سيارة اضغط",255,0,255,true) function centerWindow ( center_window, xx, yy ) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/xx,(screenH-windowH)/yy guiSetPosition(center_window,x,y,false) end wnd = guiCreateWindow(0.38, 0.25, 0.82, 0.50, "~~لوؤحةة إأآختتيآأإر أإآلــســيآإأت ", true) guiSetVisible(wnd, false) centerWindow ( wnd, 2, 4 ) b1 = guiCreateStaticImage(20, 161, 145, 118, "1.png", false, wnd) setElementData(b1, "tooltip-text", "Police Ranger", false) b2 = guiCreateStaticImage(20, 34, 145, 118, "2.png", false, wnd) setElementData(b2, "tooltip-text", "Police LS", false) b3 = guiCreateStaticImage(180, 34, 145, 118, "3.png", false, wnd) setElementData(b3, "tooltip-text", "Police LV", false) b4 = guiCreateStaticImage(340, 34, 145, 118, "4.png", false, wnd) setElementData(b4, "tooltip-text", "Police Maverick", false) b5 = guiCreateStaticImage(500, 34, 145, 118, "5.png", false, wnd) setElementData(b5, "tooltip-text", "HPV1000", false) b6 = guiCreateStaticImage(180, 161, 145, 118, "6.png", false, wnd) setElementData(b6, "tooltip-text", "Enforcer", false) b7 = guiCreateStaticImage(340, 161, 145, 118, "7.png", false, wnd) setElementData(b7, "tooltip-text", "FBI Rancher", false) b8 = guiCreateStaticImage(500, 161, 145, 118, "8.png", false, wnd) setElementData(b8, "tooltip-text", "FBI Truck", false) addEventHandler("onClientGUIClick", root, function() if ( source == b1 ) then triggerServerEvent("car",getLocalPlayer()) elseif ( source == b2 ) then triggerServerEvent("car2",getLocalPlayer()) elseif ( source == b3 ) then triggerServerEvent("car3",getLocalPlayer()) elseif ( source == b4 ) then triggerServerEvent("car4",getLocalPlayer()) elseif ( source == b5 ) then triggerServerEvent("car5",getLocalPlayer()) elseif ( source == b6 ) then triggerServerEvent("car6",getLocalPlayer()) elseif ( source == b7 ) then triggerServerEvent("car7",getLocalPlayer()) elseif ( source == b8 ) then triggerServerEvent("car8",getLocalPlayer()) end end ) jobmarker = createMarker(-2405.00000 ,-598.00000 ,132.6484,"cylinder",2,0,255,0) addEventHandler("onClientMarkerHit",jobmarker,function(p) if p == lp and not isPedInVehicle(lp) then guiSetVisible(window,true) showCursor(true) end end) بس لما اروح للماركر ما يفتح لي الوحه ارجو توضيح السبب Link to comment
' A F . Posted March 10, 2015 Share Posted March 10, 2015 جرب addEventHandler("onClientMarkerHit",jobmarker, function ( ) guiSetVisible(wnd,true) showCursor(true) end) Link to comment
nxFairlywell Posted March 10, 2015 Share Posted March 10, 2015 marker = createMarker( x, y, z, "cylinder", 2, 255, 255, 255 ) -- x, y, z = xPosition , yPosition, zPosition -- الاحداثيات ^ addEventHandler("onCilentMarkerHit", getRootElement( ), -- حدث لمس الماركر جديد function( element ) -- وظيفة جديده if source == marker then -- شرط اذا المصدر او الماركر اللي التمس هو نفس الماركر حقنا if getElementType(element) == "player" and element == getLocalPlayer() then -- شرط اذا العنصر الي لمس الماركر لاعب guiSetVisible( windowName, true ) -- windowName نفتح اللوحه end -- if نهاية end -- if نهاية end -- function نهاية ) -- قوس اغلاق الحدث Link to comment
baba Posted March 11, 2015 Author Share Posted March 11, 2015 يا حب لو ما فيها تعب تركبه مع الوحه حقتي لاني متلخبط وشيه ومو زابط معي Link to comment
[DONE]* Posted March 11, 2015 Share Posted March 11, 2015 هذه الموضوع افادني جدآ, شكرآآ لكم شبآآب 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