Hussain Posted April 26, 2012 Share Posted April 26, 2012 السلام عليكم ورحمة الله وبركاته شباب ابي اسوي ماركر تروح عليه تجيك قائمة فيها مواتر تضغط على اسم الموتر وتسوي Select وتركبه انا صممت من الـ Guieditor قائمة فيها كل شيء بس باقي البرمجات addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(510,257,168,247,"Police cars by iMTMRD",false) GUIEditor_Button[1] = guiCreateButton(24,215,61,21,"Exit",false,GUIEditor_Window[1]) end GUIEditor_Button[2] = guiCreateButton(90,215,61,21,"Select",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(16,32,139,174,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Select your car",0.2) for i = 1, 8 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListSetItemText(GUIEditor_Grid[1],0,1,"Police car (SF)") guiGridListSetItemText(GUIEditor_Grid[1],1,1,"Police car (LS)") guiGridListSetItemText(GUIEditor_Grid[1],2,1,"Police car (LV)") guiGridListSetItemText(GUIEditor_Grid[1],3,1,"Police ranger") guiGridListSetItemText(GUIEditor_Grid[1],4,1,"Enforcer") guiGridListSetItemText(GUIEditor_Grid[1],5,1,"S.W.A.T.") guiGridListSetItemText(GUIEditor_Grid[1],6,1,"FBI rancher") guiGridListSetItemText(GUIEditor_Grid[1],7,1,"FBI truck") end ) -- Direct X Drawing addEventHandler("onClientRender",root, function() dxDrawText("",562.0,292.0,567.0,297.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) end ) ابي لما يضغط على سيارة البوليس مثلآ مرتين تنزل وتروح القائمة تختفي يعني وابي لما يضغط على كلمة exit تروح القائمة وجزأإكم الله ألف خير Link to comment
TAPL Posted April 26, 2012 Share Posted April 26, 2012 تبيه بس لتيم بوليس و إلا كيف وتراه كودك كله أخطاء خخ Link to comment
Hussain Posted April 26, 2012 Author Share Posted April 26, 2012 تبيه بس لتيم بوليس و إلا كيفوتراه كودك كله أخطاء خخ ايه يالغلا ابيه للبوليس ههههه وش اسسوي ولآ عمري جربت اسسوي قائمة كذا بس على ايدك ان شاء الله بنتعلم زي ماعلمتنا كيف البوابات ششكرا عالمبادرة الطيبة في إنتظأإرك بـ كل حمأإس Link to comment
xTeacherx Posted April 26, 2012 Share Posted April 26, 2012 Client.lua window = guiCreateWindow(510,257,168,247,"Police cars by iMTMRD",false) bb1 = guiCreateButton(24,215,61,21,"Exit",false,window) guiSetVisible(window,false) bb2 = guiCreateButton(90,215,61,21,"Select",false,window) cargrid = guiCreateGridList(16,32,139,174,false,window) guiGridListAddColumn(cargrid," Your Car",0.3) guiGridListSetColumnWidth(cargrid,1,0.4,true) function closeInfo ( ) if ( guiGetVisible ( window ) == true ) then guiSetVisible ( window, false ) showCursor ( false ) end end addEventHandler ("onClientGUIClick", bb1, closeInfo) ----------------------------------------------------------------------- theMarker = createMarker(2484.5788574219, -1667.53125, 13.34375, 'cylinder', 2.0, 255, 0, 0, 150) function tagColorAndSkin (button, state, absoluteX, absoluteY) if (source == theMarker) then guiSetVisible(window,true) showCursor ( true ) end end addEventHandler ("onClientMarkerHit", getRootElement(), tagColorAndSkin) ----------------------------------------------------------------------------------- function populateGridlist() local rootnode = xmlLoadFile("car.xml") if rootnode then for _,group in ipairs(xmlNodeGetChildren(rootnode)) do local row = guiGridListAddRow(cargrid) local name = xmlNodeGetAttribute(group,"type") guiGridListSetItemText(cargrid,row,1,name,true,false) for _,car in ipairs(xmlNodeGetChildren(group)) do row = guiGridListAddRow(cargrid) name = xmlNodeGetAttribute(car,"name") guiGridListSetItemText(cargrid,row,1,name,false,false) guiGridListSetItemData(cargrid,row,1,tostring(id)) end end xmlUnloadFile(rootnode) end end addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() ), function() populateGridlist() end ) Car.xml type="Helicopters"> "548" name="Cargobob" /> "425" name="Hunter" /> "417" name="Leviathan" /> "487" name="Maverick" /> "488" name="News Chopper" /> "497" name="Police Maverick" /> "563" name="Raindance" /> "447" name="Seasparrow" /> "469" name="Sparrow" /> Link to comment
TAPL Posted April 26, 2012 Share Posted April 26, 2012 ^ خرابيط تايم @Hussain, أنا سويته بس ما بحطه هنا -.- Link to comment
Hussain Posted April 26, 2012 Author Share Posted April 26, 2012 ^ خرابيط تايم@Hussain, أنا سويته بس ما بحطه هنا -.- طيب ضيفني [email protected] انت اصلآ يقولي هولستن ايميلك تهكر ايميلك القديم ماشوفك تخش فيه Link to comment
abu5lf Posted April 27, 2012 Share Posted April 27, 2012 Client.lua window = guiCreateWindow(510,257,168,247,"Police cars by iMTMRD",false) bb1 = guiCreateButton(24,215,61,21,"Exit",false,window) guiSetVisible(window,false) bb2 = guiCreateButton(90,215,61,21,"Select",false,window) cargrid = guiCreateGridList(16,32,139,174,false,window) guiGridListAddColumn(cargrid," Your Car",0.3) guiGridListSetColumnWidth(cargrid,1,0.4,true) function closeInfo ( ) if ( guiGetVisible ( window ) == true ) then guiSetVisible ( window, false ) showCursor ( false ) end end addEventHandler ("onClientGUIClick", bb1, closeInfo) ----------------------------------------------------------------------- theMarker = createMarker(2484.5788574219, -1667.53125, 13.34375, 'cylinder', 2.0, 255, 0, 0, 150) function tagColorAndSkin (button, state, absoluteX, absoluteY) if (source == theMarker) then guiSetVisible(window,true) showCursor ( true ) end end addEventHandler ("onClientMarkerHit", getRootElement(), tagColorAndSkin) ----------------------------------------------------------------------------------- function populateGridlist() local rootnode = xmlLoadFile("car.xml") if rootnode then for _,group in ipairs(xmlNodeGetChildren(rootnode)) do local row = guiGridListAddRow(cargrid) local name = xmlNodeGetAttribute(group,"type") guiGridListSetItemText(cargrid,row,1,name,true,false) for _,car in ipairs(xmlNodeGetChildren(group)) do row = guiGridListAddRow(cargrid) name = xmlNodeGetAttribute(car,"name") guiGridListSetItemText(cargrid,row,1,name,false,false) guiGridListSetItemData(cargrid,row,1,tostring(id)) end end xmlUnloadFile(rootnode) end end addEventHandler("onClientResourceStart", getResourceRootElement( getThisResource() ), function() populateGridlist() end ) Car.xml type="Helicopters"> "548" name="Cargobob" /> "425" name="Hunter" /> "417" name="Leviathan" /> "487" name="Maverick" /> "488" name="News Chopper" /> "497" name="Police Maverick" /> "563" name="Raindance" /> "447" name="Seasparrow" /> "469" name="Sparrow" /> ناقصك اشياء وانت مخربط + نسيت createVehicle Link to comment
Hussain Posted May 4, 2012 Author Share Posted May 4, 2012 مسسساعده يَ شباب كل الي حطيتوه غلط Link to comment
xTeacherx Posted May 4, 2012 Share Posted May 4, 2012 مو قال تابل يبي يرسل لك ع الخاص ؟ Link to comment
Hussain Posted May 4, 2012 Author Share Posted May 4, 2012 مو قال تابل يبي يرسل لك ع الخاص ؟ لآ مارسل شيء 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