Dr.Xen Posted December 27, 2013 Share Posted December 27, 2013 (edited) السلام عليكم ورحمة الله وبركاته محتاج كود سيارات للقروب توضيح : انا حطيت من ماب ادتورسيارات وابي اخليهم خاصةة للقروب سيستيم الكود الثاني :"ماركر يصلح الموتر ويزين السيارة يعني يحط نيترو + وشم اذا كانت السيارة اسمها سلطان.. الكود الثالث :" انا سويت لوحة انتقالات بس ابيهم خاصةة للقروب اذا لمس الماركر يفتح فقط لأاعضاء القروب الله لأ يهينكم .. وأآسف اذا كان طلبي كثير Edited December 27, 2013 by Guest Link to comment
al-Kobra Posted December 27, 2013 Share Posted December 27, 2013 تبغي اللوحة قريد لست ؟؟ Link to comment
Dr.Xen Posted December 27, 2013 Author Share Posted December 27, 2013 انا سويت اللوحة باقي كود علشان اخليه للقروب...وماركر يعني اذا لمست الماركر يطلع لك اللوحة اذا كنت من القروب Link to comment
al-Kobra Posted December 27, 2013 Share Posted December 27, 2013 انا سويت اللوحة باقي كود علشان اخليه للقروب...وماركر يعني اذا لمست الماركر يطلع لك اللوحة اذا كنت من القروب Event = 'onClientMarkerHit' --اذا دخل الماركر guiSetVisible --يظهر اللوحة getElementData --هنا عشان يتحقق من اسم القروب واذا ما عرفت قول Link to comment
Dr.Xen Posted December 27, 2013 Author Share Posted December 27, 2013 ذا الكود حق بشر ..بس يفتح اذا ضغط اف2 وللكل ممكن تخليه يفتح فقط للأعضاء القروب يوم يلمس الماركر GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetVisible (GUIEditor_Window[1], false) -- هنا اسم النافذة ووظيفة هذا الكود لما يشتغل المود ما تطلع النافذة بوجهك function OpenWin()-- وظيفة فتح النافذة بزر if guiGetVisible ( GUIEditor_Window[1] ) then -- اسم النافذة guiSetVisible ( GUIEditor_Window[1], false )-- اسم النافذة showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( GUIEditor_Window[1], true )-- اسم النافذة showCursor(true) guiSetInputEnabled(true) end end bindKey("F2", "down", OpenWin) function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[1] then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer,1823.44202,872.06281,10.72149) -- هنا الاحداثيات setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(d,"NormalTextColour", "FF00FF00") -- لتليون الزر باللون الاخضر ----------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[2] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(n,"NormalTextColour", "FF00FF00") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[3] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(n,"NormalTextColour", "FF00FF00") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[4] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(n,"NormalTextColour", "FF00FF00") -------------------------------------------- Link to comment
al-Kobra Posted December 27, 2013 Share Posted December 27, 2013 بدل كود فتح اللوحة بهذا : Maarker = createMarker ( .... ) --حط احداثيات الماركر addEventHandler ( "onClientMarkerHit", Maarker, function ( hitPlayer ) if ( getElementData ( source , "gang" ) == "اسم القروب" ) then if getElementType ( hitPlayer ) == "player" then guiSetVisible ( اسم اللوحة, true ) showCursor ( true ) end end ) addEventHandler ( "onClientMarkerHit", Maarker, function ( leftPlayer ) if getElementType ( liftPlayer ) == "player" then guiSetVisible ( اسم اللوحة, false ) showCursor ( false ) end end ) Link to comment
Dr.Xen Posted December 27, 2013 Author Share Posted December 27, 2013 شوف كذا صحيح #؟؟ GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetVisible (GUIEditor_Window[1], false) -- هنا اسم النافذة ووظيفة هذا الكود لما يشتغل المود ما تطلع النافذة بوجهك Maarker = createMarker ( 179.69999694824,1915.3000488281,17 "cylinder" ,1.5 ) addEventHandler ( "onClientMarkerHit", Maarker, function ( hitPlayer ) if ( getElementData ( source , "gang" ) == "ARMY" ) then if getElementType ( hitPlayer ) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end ) addEventHandler ( "onClientMarkerHit", Maarker, function ( leftPlayer ) if getElementType ( liftPlayer ) == "player" then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end ) function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[1] then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer,1823.44202,872.06281,10.72149) -- هنا الاحداثيات outputChatBox("تم انتقال الى مركز الشرطة",source,255,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[1],"NormalTextColour", "FF0FFF0F") -- لتليون الزر باللون الاخضر ----------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[2] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة البنك",source,255,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[2],"NormalTextColour", "F000F000") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[3] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الي محل اسلحة",source,255,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[3],"NormalTextColour", "FFFF00FF") -------------------------------------------- function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[4] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة سرقت البنك",source,0,255,0,true) setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[4],"NormalTextColour", "FFFFFF00") -------------------------------------------- Link to comment
Dr.Xen Posted December 27, 2013 Author Share Posted December 27, 2013 مازبط اعتقد في غلط عندي Link to comment
!#NssoR_) Posted December 27, 2013 Share Posted December 27, 2013 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetVisible (GUIEditor_Window[1], false) Maarker = createMarker ( 179.69999694824,1915.3000488281,17 "cylinder" ,1.5 ) addEventHandler ( "onClientMarkerHit", Maarker, function ( hitPlayer ) if ( getElementData ( hitPlayer , "gang" ) == "ARMY" ) then if getElementType ( hitPlayer ) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end end ) addEventHandler ( "onClientMarkerLeave", Maarker, function ( leftPlayer ) if getElementType ( liftPlayer ) == "player" and ( getElementData ( liftPlayer , "gang" ) == "ARMY" ) then then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end ) function onGuiClick(button, state, absoluteX, absoluteY) if source == GUIEditor_Button[1] then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer,1823.44202,872.06281,10.72149) -- هنا الاحداثيات outputChatBox("تم انتقال الى مركز الشرطة") setPedRotation(localPlayer,91.98) elseif source == GUIEditor_Button[2] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة البنك") setPedRotation(localPlayer,91.98) elseif source == GUIEditor_Button[3] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الي محل اسلحة") setPedRotation(localPlayer,91.98) elseif source == GUIEditor_Button[4] then setElementPosition(localPlayer,2076.32129,865.88281,6.79159) outputChatBox("تم انتقال الى مهمة سرقت البنك") setPedRotation(localPlayer,91.98) end end addEventHandler("onClientGUIClick", root, onGuiClick) guiSetProperty(GUIEditor_Button[1],"NormalTextColour", "FF0FFF0F") -- لتليون الزر باللون الاخضر ----------------------------------------------- Link to comment
TAPL Posted December 27, 2013 Share Posted December 27, 2013 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(221,136,394,376,"لوحة انتقالأت خاصة لقروب أرمي",false) guiSetAlpha(GUIEditor_Window[1],1) guiSetVisible (GUIEditor_Window[1], false) GUIEditor_Button[1] = guiCreateButton(258,116,127,31,"مركز الشرطة",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(9,116,127,31,"مهمة البنك",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(9,176,127,31,"محل اسلحة",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(258,176,127,31,"مهمة سرقت البنك",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(113,20,193,150,"images/shruk.png",false,GUIEditor_Window[1]) guiSetProperty(GUIEditor_Button[1], "NormalTextColour", "FF0FFF0F") -- لتليون الزر باللون الاخضر Maarker = createMarker(179.7, 1915.3, 17, "cylinder", 1.5) addEventHandler("onClientMarkerHit", Maarker, function(hitPlayer) if (hitPlayer == localPlayer) then if (getElementData(hitPlayer, "gang") == "ARMY") then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end end end, false) addEventHandler("onClientMarkerLeave", Maarker, function(leftPlayer) if (leftPlayer == localPlayer) then if (getElementData(liftPlayer, "gang") == "ARMY") then if guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end end end, false) function onGuiClick() if (source == GUIEditor_Button[1]) then-- هنا اسم الزر الي اذا ضغطنا عليه ينقلنا setElementPosition(localPlayer, 1823.44, 872, 10.72) -- هنا الاحداثيات outputChatBox("تم انتقال الى مركز الشرطة") setPedRotation(localPlayer, 91.98) elseif (source == GUIEditor_Button[2]) then setElementPosition(localPlayer, 2076.3, 865.9, 6.79) outputChatBox("تم انتقال الى مهمة البنك") setPedRotation(localPlayer, 91.98) elseif (source == GUIEditor_Button[3]) then setElementPosition(localPlayer,2076.3, 865.9, 6.79) outputChatBox("تم انتقال الي محل اسلحة") setPedRotation(localPlayer, 91.98) elseif (source == GUIEditor_Button[4]) then setElementPosition(localPlayer, 2076.3, 865.9, 6.79) outputChatBox("تم انتقال الى مهمة سرقت البنك") setPedRotation(localPlayer, 91.98) end end addEventHandler("onClientGUIClick", guiRoot, onGuiClick) Link to comment
Dr.Xen Posted December 27, 2013 Author Share Posted December 27, 2013 ممكن كود :"ماركر يصلح الموتر ويزين السيارة يعني يحط نيترو + وشم اذا كانت السيارة اسمها سلطان.. فقط لأاعضاء القروب Link to comment
TAPL Posted December 27, 2013 Share Posted December 27, 2013 createMarker -- صنع ماركر getElementType -- التحقق من ان الي دخل الماركر سيارة getVehicleController -- تجيب اللاعب الي يسوق السيارة getElementData -- تتأكد من قروب اللاعب getElementModel -- تتأكد ان السيارة سلطان addVehicleUpgrade -- ركب نيترو او جنوط او اي شي setVehiclePaintjob -- تركب وشم Event: "onMarkerHit" Link to comment
#DRAGON!FIRE Posted December 27, 2013 Share Posted December 27, 2013 ممكن كود :"ماركر يصلح الموتر ويزين السيارة يعني يحط نيترو + وشم اذا كانت السيارة اسمها سلطان.. فقط لأاعضاء القروب # هذا ممثال بسيط , وطبعا ما يسوي اللون ولأ يصلح او اي شي الا وقت السيارة يكون دمها اقل من 100 addEventHandler( "onMarkerHit", marker, function ( element ) if ( getElementType ( element ) == "vehicle" ) then if ( getElementData ( getVehicleController ( element ) , "gang" ) == "ARMY" ) then if ( getElementHealth ( element ) < 100 ) then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( element, r, g, b ) fixVehicle ( element ) addVehicleUpgrade ( element, 1010 ) setVehiclePaintjob ( element, 2 ) end end end end ) 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