charaf12 Posted March 13, 2014 Share Posted March 13, 2014 شباب ماركر ما يظهر هذا كود GUIEditor = { gridlist = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.92) guiSetProperty(wnd, "CaptionColour", "FF788D6B") but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) guiSetFont(but1, "default-small") guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) guiSetFont(but2, "default-small") guiSetProperty(but2, "NormalTextColour", "FF24F508") but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) guiSetFont(but3, "default-small") guiSetProperty(but3, "NormalTextColour", "FFF92603") but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) guiSetFont(but5, "default-small") guiSetProperty(but5, "NormalTextColour", "FFC536C3") but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) guiSetFont(but6, "default-small") guiSetProperty(but6, "NormalTextColour", "FF1909F1") but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) guiSetFont(but7, "default-small") guiSetProperty(but7, "NormalTextColour", "FF05DBF4") GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) for i = 1, 4 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, Car| SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false) end ) addEventHandler ( 'onClientGUIClick', resourceRoot, function( ) if ( source == but1) then triggerServerEvent ( 'car1', localPlayer ) elseif ( source == but2) then triggerServerEvent ( 'car2', localPlayer ) elseif ( source == but3) then triggerServerEvent ( 'car3', localPlayer ) elseif ( source == but4) then triggerServerEvent ( 'car4', localPlayer ) elseif ( source == but5) then triggerServerEvent ( 'car5', localPlayer ) elseif ( source == but6) then triggerServerEvent ( 'car6', localPlayer ) elseif ( source == but7) then triggerServerEvent ( 'car7', localPlayer ) end end ) local markerD = createMarker(0,0,0,"cylinder", 4 ) addEventHandler('onClientMarkerHit',markerD,function (plr) if plr == localPlayer then guiSetVisible(wnd,true) showCursor ( true ) end end ) Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 هذا سيرفر لو تبون vehicle = {} addEvent( 'car1', true ) addEventHandler( 'car1', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 431, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) addEvent( 'car2', true ) addEventHandler( 'car2', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 432, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) addEvent( 'car3', true ) addEventHandler( 'car3', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 434, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) addEvent( 'car4', true ) addEventHandler( 'car4', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 421, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) addEvent( 'car5', true ) addEventHandler( 'car5', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 132, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) addEvent( 'car6', true ) addEventHandler( 'car6', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 232, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) addEvent( 'car7', true ) addEventHandler( 'car7', root,function() local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( 442, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) Link to comment
فاّرس Posted March 13, 2014 Share Posted March 13, 2014 ياريت تحط عنوان مناسب للموضوع ,, سطر 38, Car| SOON" > "Car| SOON" Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 شباب ابي حل ماركر وبللب ما يظهر Link to comment
</Mr.Tn6eL> Posted March 13, 2014 Share Posted March 13, 2014 (edited) في سيارة رقمها 132 واكوادك نصها زايدة وشخابيط Client Side local markerD = createMarker(x,y,z,"cylinder", 4 ) createBlipAttachedTo ( markerD, id ) GUIEditor = { gridlist = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.92) guiSetProperty(wnd, "CaptionColour", "FF788D6B") but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) guiSetFont(but1, "default-small") guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) guiSetFont(but2, "default-small") guiSetProperty(but2, "NormalTextColour", "FF24F508") but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) guiSetFont(but3, "default-small") guiSetProperty(but3, "NormalTextColour", "FFF92603") but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) guiSetFont(but5, "default-small") guiSetProperty(but5, "NormalTextColour", "FFC536C3") but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) guiSetFont(but6, "default-small") guiSetProperty(but6, "NormalTextColour", "FF1909F1") but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) guiSetFont(but7, "default-small") guiSetProperty(but7, "NormalTextColour", "FF05DBF4") GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) for i = 1, 4 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Car| SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false) end) addEventHandler ( 'onClientGUIClick', root, function( ) if ( source == but1) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but2) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but3) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but4) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but5) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but6) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but7) then triggerServerEvent ( 'car', localPlayer, id ) end end) addEventHandler ( "onClientMarkerHit" , markerD ,function ( hit ) if hit == localPlayer then guiSetVisible ( wnd, true ) showCursor ( true ) end end , false ) Server Side vehicle = {} addEvent( 'car', true ) addEventHandler( 'car', root,function(id) local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( id, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end) Edited March 13, 2014 by Guest Link to comment
EH10 Posted March 13, 2014 Share Posted March 13, 2014 في سيارة رقمها 132 واكوادك نصها زايدة وشخابيط Client Side local markerD = createMarker(x,y,z,"cylinder", 4 ) createBlipAttachedTo ( markerD, id ) GUIEditor = { gridlist = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.92) guiSetProperty(wnd, "CaptionColour", "FF788D6B") but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) guiSetFont(but1, "default-small") guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) guiSetFont(but2, "default-small") guiSetProperty(but2, "NormalTextColour", "FF24F508") but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) guiSetFont(but3, "default-small") guiSetProperty(but3, "NormalTextColour", "FFF92603") but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) guiSetFont(but5, "default-small") guiSetProperty(but5, "NormalTextColour", "FFC536C3") but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) guiSetFont(but6, "default-small") guiSetProperty(but6, "NormalTextColour", "FF1909F1") but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) guiSetFont(but7, "default-small") guiSetProperty(but7, "NormalTextColour", "FF05DBF4") GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) for i = 1, 4 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Car| SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false) end ) addEventHandler ( 'onClientGUIClick', root, function( ) if ( source == but1) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but2) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but3) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but4) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but5) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but6) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but7) then triggerServerEvent ( 'car', localPlayer, id ) end end ) addEventHandler ( "onClientMarkerHit" , markerD ,function ( hit ) if hit == localPlayer then guiSetVisible ( wnd, true ) showCursor ( true ) end end , false ) Server Side vehicle = {} addEvent( 'car', true ) addEventHandler( 'car', root,function(id) local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( id, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) وين لون الماركر Link to comment
</Mr.Tn6eL> Posted March 13, 2014 Share Posted March 13, 2014 في سيارة رقمها 132 واكوادك نصها زايدة وشخابيط Client Side local markerD = createMarker(x,y,z,"cylinder", 4 ) createBlipAttachedTo ( markerD, id ) GUIEditor = { gridlist = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(191, 82, 474, 427, "[Cars System ]", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.92) guiSetProperty(wnd, "CaptionColour", "FF788D6B") but1 = guiCreateButton(9, 19, 129, 79, "NGR-500", false, wnd) guiSetFont(but1, "default-small") guiSetProperty(but1, "NormalTextColour", "FF1A0AF4") but2 = guiCreateButton(9, 130, 129, 73, "Banshee", false, wnd) guiSetFont(but2, "default-small") guiSetProperty(but2, "NormalTextColour", "FF24F508") but3 = guiCreateButton(9, 258, 129, 70, "BMX", false, wnd) guiSetFont(but3, "default-small") guiSetProperty(but3, "NormalTextColour", "FFF92603") but5 = guiCreateButton(155, 20, 116, 78, "Alpha", false, wnd) guiSetFont(but5, "default-small") guiSetProperty(but5, "NormalTextColour", "FFC536C3") but6 = guiCreateButton(154, 139, 136, 64, "GTR-500", false, wnd) guiSetFont(but6, "default-small") guiSetProperty(but6, "NormalTextColour", "FF1909F1") but7 = guiCreateButton(164, 266, 136, 62, "Bobcat", false, wnd) guiSetFont(but7, "default-small") guiSetProperty(but7, "NormalTextColour", "FF05DBF4") GUIEditor.memo[1] = guiCreateMemo(12, 334, 298, 83, "New Cars In GridList \n\n,-[PS]\n\nUpdate : Add Yamaha R1", false, wnd) GUIEditor.gridlist[1] = guiCreateGridList(319, 24, 145, 393, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "New Cars", 0.9) for i = 1, 4 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "BMW|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Ferari|SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Car| SOON", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "Yamaha R1 ", false, false) end ) addEventHandler ( 'onClientGUIClick', root, function( ) if ( source == but1) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but2) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but3) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but4) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but5) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but6) then triggerServerEvent ( 'car', localPlayer, id ) elseif ( source == but7) then triggerServerEvent ( 'car', localPlayer, id ) end end ) addEventHandler ( "onClientMarkerHit" , markerD ,function ( hit ) if hit == localPlayer then guiSetVisible ( wnd, true ) showCursor ( true ) end end , false ) Server Side vehicle = {} addEvent( 'car', true ) addEventHandler( 'car', root,function(id) local x, y, z = getElementPosition ( source ) if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end vehicle[source] = createVehicle ( id, x, y, z + 10 ) outputChatBox ( "Car Spwan!", source) end ) وين لون الماركر لون الماركر والشفافيه ليس من الارقمنات المهمة واذ يبي لون و الشفافيه يحط ذا الكود بدال كود الماركر حقه local markerD = createMarker(x,y,z,"cylinder",4,r,g,b,alpha) لو تشوف الSyntax هذا السيرفر marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255, visibleTo = getRootElement( ) ] ) الكلنت marker createMarker ( float x, float y, float z [, string theType = "checkpoint", float size = 4.0, int r = 0, int g = 0, int b = 255, int a = 255 ] ) Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 انت مو مكمل سيرفر عامل لسياره واحده تريقر Link to comment
</Mr.Tn6eL> Posted March 13, 2014 Share Posted March 13, 2014 انت مو مكمل سيرفر عامل لسياره واحده تريقر السيرفر لاتعدل شي شوف الترايقر بالكلنت تلقى كلمة id حط بدالها اي دي السيارة انا مختصر الكود لك Link to comment
charaf12 Posted March 14, 2014 Author Share Posted March 14, 2014 كيف اختصرته ؟ ممكن تقولي لي ابي اعرف اول مره اشوف اختصار تريقر Link to comment
</Mr.Tn6eL> Posted March 15, 2014 Share Posted March 15, 2014 كيف اختصرته ؟ممكن تقولي لي ابي اعرف اول مره اشوف اختصار تريقر لو تشوف الترايقر كلمة id حط بداله اي دي السيارة وتلاحظ كلمة id addEventHandler( 'car', root,function(id) وتلاحظ هنا كلمة id vehicle[source] = createVehicle ( id, x, y, z + 10 ) بس مدري كيف اشرح لك عارف شرحي Link to comment
xFace[B]ook Posted March 15, 2014 Share Posted March 15, 2014 صاحب الموضوع متبند مايحتاج ترد عـ مواضيعه Link to comment
</Mr.Tn6eL> Posted March 15, 2014 Share Posted March 15, 2014 صاحب الموضوع متبند مايحتاج ترد عـ مواضيعه معليش ماانتبهت 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