Doffy Posted January 28, 2017 Share Posted January 28, 2017 (edited) ابي اول ما الواحد يختار نوع السيارة من الصورة الي قدامكم ويضغط علي زر ياخذ السيارة الي هو اختارها http://c.top4top.ne/p_393pnyhk1.pntg Edited January 28, 2017 by KinG_Himoo12 Link to comment
Abu-Solo Posted January 28, 2017 Share Posted January 28, 2017 guiComboBoxGetSelected local combo = guiComboBoxGetSelected(combox) ----- نسوي اختصار يجيب اول شئ موجود فـ الكومبو if combo == 0 then ---- نسوي تحقق ان اللي اختاره اول شئ في الكومبو ----- Your code في البداية بتسوي حدث onClientGUIClick if source == اسم الكومبو Link to comment
Doffy Posted January 28, 2017 Author Share Posted January 28, 2017 1 hour ago, KinG_Himoo12 said: ابي اول ما الواحد يختار نوع السيارة من الصورة الي قدامكم ويضغط علي زر ياخذ السيارة الي هو اختارها http://c.top4top.ne/p_393pnyhk1.pntg ممكن تكمله يخوي الله يجزاك خير ؟؟ Link to comment
Abu-Solo Posted January 28, 2017 Share Posted January 28, 2017 بسويلك الكلينت فقط انت كمل السيرفر Link to comment
Doffy Posted January 28, 2017 Author Share Posted January 28, 2017 Just now, Abu-Solo said: بسويلك الكلينت فقط انت كمل السيرفر اوكي شكرا ممكن تسويه Link to comment
^iiEcoo'x_) Posted January 28, 2017 Share Posted January 28, 2017 (edited) -- Created By #_iMr,[E]coo ,,,, Not Deleted It local combox = اسم الكومبوبوكس local button = اسم الزر addEventHandler("onClientGUIClick", resourceRoot, function() if source == button then local Select = guiComboBoxGetSelected(combox) local Text = guiComboBoxGetItemText(combox, Select) if Text == "اسم السيارة الاولى الموجودة بالكومبوبكوس تحط هنا بدون زيادة او نقصنان" then -- Your Code elseif Text == "اسم السيارة الثانية الموجودة بالكومبوبكوس تحط هنا بدون زيادة او نقصنان" then -- Your Code end -- end if end -- end if end -- end function ) Edited January 28, 2017 by #_iMr.[E]coo Link to comment
Abu-Solo Posted January 28, 2017 Share Posted January 28, 2017 2 minutes ago, #_iMr.[E]coo said: -- Created By #_iMr,[E]coo ,,,, Not Deleted It local combox = اسم الكومبوبوكس local button = اسم الزر addEventHandler("onClientGUIClick", resourceRoot, function() if source == button then local Select = guiComboBoxGetSelected(combox) local Text = guiComboBoxGetItemText(combox, Select) if Text == "اسم السيارة الاولى الموجودة بالكومبوبكوس تحط هنا بدون زيادة او نقصنان" then -- Your Code elseif Text == "اسم السيارة الثانية الموجودة بالكومبوبكوس تحط هنا بدون زيادة او نقصنان" then -- Your Code end -- end if end -- end if end -- end function ) تسلم علي مساعدته ي بطل كنت قاعد أسويله الكود وفجأه احصل الصوت ذا يجي حق لما رسالة جديدة تجي يقدر انه يسوي تحقق ان اللي اختاره هو اول او ثاني خيار مو شرط يجيب الكلام 1 Link to comment
^iiEcoo'x_) Posted January 28, 2017 Share Posted January 28, 2017 1 minute ago, Abu-Solo said: تسلم علي مساعدته ي بطل كنت قاعد أسويله الكود وفجأه احصل الصوت ذا يجي حق لما رسالة جديدة تجي يقدر انه يسوي تحقق ان اللي اختاره هو اول او ثاني خيار مو شرط يجيب الكلام نو ما تقدر + ما اسامحه اذا يمسح كلامي فوق Link to comment
Doffy Posted January 28, 2017 Author Share Posted January 28, 2017 Just now, #_iMr.[E]coo said: نو ما تقدر + ما اسامحه اذا يمسح كلامي فوق وربي ما رح امسحه علشانك يا غالي 4 minutes ago, KinG_Himoo12 said: وربي ما رح امسحه علشانك يا غالي يخوي حاولت ما نفع شوف كلنت -- Created By #_iMr,[E]coo ,,,, Not Deleted It local combox = GUIEditor.combobox[1] local button = GUIEditor.button[6] addEventHandler("onClientGUIClick", resourceRoot, function() if source == button then local Select = guiComboBoxGetSelected(combox) local Text = guiComboBoxGetItemText(combox, Select) if Text == "Infernus" then triggerServerEvent("GetInfernus") elseif Text == "Sultan" then triggerServerEvent("GetSultan") end end end ) سيرفر Vehicle = {}, addEvent ( "GetInfernus", true ) addEventHandler ( "GetInfernus", root, function ( ) local x, y, z = getElementPosition ( source ) local _,_,r = getPedRotation ( source ) if isElement( Vehicle[source] ) then destroyElement( Vehicle[source] ) else Vehicle[source] = createVehicle ( 411, x, y, z+1, 0, 0,r) warpPedIntoVehicle ( source,Vehicle[source] ) end end ); addEvent ( "GetSultan", true ) addEventHandler ( "GetSultan", root, function ( ) local x, y, z = getElementPosition ( source ) local _,_,r = getPedRotation ( source ) if isElement( Vehicle[source] ) then destroyElement( Vehicle[source] ) else Vehicle[source] = createVehicle ( 560, x, y, z+1, 0, 0,r) warpPedIntoVehicle ( source,Vehicle[source] ) end end ); 1 Link to comment
' A F . Posted January 28, 2017 Share Posted January 28, 2017 addEventHandler('onClientGUIClick',root, function ( ) if ( source == GUIEditor.button[6] ) then local sel = guiComboBoxGetSelected ( GUIEditor.combobox[1] ); local aText = guiComboBoxGetItemText ( GUIEditor.combobox[1] , sel ); if ( sel ~= 0 ) then if ( aText == 'CarName' ) then triggerServerEvent('GetVehicle',localPlayer,411); elseif ( aText == 'CarName' ) then triggerServerEvent('GetVehicle',localPlayer,560); end end end end ); --- Server Side local VehicleTable = { }; addEvent ( 'GetVehicle' , true ); addEventHandler ( 'GetVehicle' , root , function ( idCar ) if ( idCar and type ( idCar ) == 'number' ) then if ( isElement ( VehicleTable [ source ] ) ) then destroyElement ( VehicleTable [ source ] ) end if ( getPedOccupiedVehicle ( source ) ) then removePedFromVehicle ( source ) end local pos = { getElementPosition ( source ) }; VehicleTable [ source ] = createVehicle ( idCar , pos[1] , pos[2] , pos[3] ) warpPedIntoVehicle ( source , VehicleTable [ source ] ) end end ); addEventHandler ( 'onPlayerQuit', root , function ( ) if ( isElement ( VehicleTable [ source ] ) ) then destroyElement ( VehicleTable [ source ] ) VehicleTable [ source ] = nil end end ); جرب 1 Link to comment
Doffy Posted January 28, 2017 Author Share Posted January 28, 2017 5 minutes ago, Default said: addEventHandler('onClientGUIClick',root, function ( ) if ( source == GUIEditor.button[6] ) then local sel = guiComboBoxGetSelected ( GUIEditor.combobox[1] ); local aText = guiComboBoxGetItemText ( GUIEditor.combobox[1] , sel ); if ( sel ~= 0 ) then if ( aText == 'CarName' ) then triggerServerEvent('GetVehicle',localPlayer,411); elseif ( aText == 'CarName' ) then triggerServerEvent('GetVehicle',localPlayer,560); end end end end ); --- Server Side local VehicleTable = { }; addEvent ( 'GetVehicle' , true ); addEventHandler ( 'GetVehicle' , root , function ( idCar ) if ( idCar and type ( idCar ) == 'number' ) then if ( isElement ( VehicleTable [ source ] ) ) then destroyElement ( VehicleTable [ source ] ) end if ( getPedOccupiedVehicle ( source ) ) then removePedFromVehicle ( source ) end local pos = { getElementPosition ( source ) }; VehicleTable [ source ] = createVehicle ( idCar , pos[1] , pos[2] , pos[3] ) warpPedIntoVehicle ( source , VehicleTable [ source ] ) end end ); addEventHandler ( 'onPlayerQuit', root , function ( ) if ( isElement ( VehicleTable [ source ] ) ) then destroyElement ( VehicleTable [ source ] ) VehicleTable [ source ] = nil end end ); جرب موب شغال يخوي Link to comment
Abu-Solo Posted January 28, 2017 Share Posted January 28, 2017 5 minutes ago, Default said: addEventHandler('onClientGUIClick',root, function ( ) if ( source == GUIEditor.button[6] ) then local sel = guiComboBoxGetSelected ( GUIEditor.combobox[1] ); local aText = guiComboBoxGetItemText ( GUIEditor.combobox[1] , sel ); if ( sel ~= 0 ) then if ( aText == 'CarName' ) then triggerServerEvent('GetVehicle',localPlayer,411); elseif ( aText == 'CarName' ) then triggerServerEvent('GetVehicle',localPlayer,560); end end end end ); --- Server Side local VehicleTable = { }; addEvent ( 'GetVehicle' , true ); addEventHandler ( 'GetVehicle' , root , function ( idCar ) if ( idCar and type ( idCar ) == 'number' ) then if ( isElement ( VehicleTable [ source ] ) ) then destroyElement ( VehicleTable [ source ] ) end if ( getPedOccupiedVehicle ( source ) ) then removePedFromVehicle ( source ) end local pos = { getElementPosition ( source ) }; VehicleTable [ source ] = createVehicle ( idCar , pos[1] , pos[2] , pos[3] ) warpPedIntoVehicle ( source , VehicleTable [ source ] ) end end ); addEventHandler ( 'onPlayerQuit', root , function ( ) if ( isElement ( VehicleTable [ source ] ) ) then destroyElement ( VehicleTable [ source ] ) VehicleTable [ source ] = nil end end ); جرب انت ليه نهاية كل كود تحط ; Link to comment
' A F . Posted January 28, 2017 Share Posted January 28, 2017 @Abu-Solo مدري فضاوه ض + تخلي الكود حلو ومرتب بالنسبة لي @KinG_Himoo12 /debugscript 3 ? 1 Link to comment
Doffy Posted January 28, 2017 Author Share Posted January 28, 2017 Just now, Default said: @Abu-Solo مدري فضاوه ض + تخلي الكود حلو ومرتب بالنسبة لي @KinG_Himoo12 /debugscript 3 ? ما يطلع شي Link to comment
Abu-Solo Posted January 28, 2017 Share Posted January 28, 2017 Just now, KinG_Himoo12 said: ما يطلع شي شغل الديبق واضغط علي السيارة اللي تبي تختارها وراح يجيك كلام في debug انسخ الصورة او اكتب الكلام اللي طلع # Link to comment
Doffy Posted January 28, 2017 Author Share Posted January 28, 2017 Just now, Abu-Solo said: شغل الديبق واضغط علي السيارة اللي تبي تختارها وراح يجيك كلام في debug انسخ الصورة او اكتب الكلام اللي طلع # ادري السيارة الثانية اشتغلت والاولي لا يخوي خلاص يخوي حليت المشكلة شكرا ليكم جدا ^^ Link to comment
^iiEcoo'x_) Posted January 28, 2017 Share Posted January 28, 2017 (edited) -- الحقوق تعود لــ برستيج VehicleTable = { } addEvent ( "GetVehicle",true ) addEventHandler ( "GetVehicle",root, function ( IDCAR ) local vehicle = getPedOccupiedVehicle( source ) if vehicle then destroyElement( vehicle ) end if isElement ( VehicleTable [ source ] ) then destroyElement ( VehicleTable [ source ] ) end local x1,y1,z1 = getElementPosition ( source ) VehicleTable [source] = createVehicle ( IDCAR,x1,y1,z1 ) warpPedIntoVehicle( source,VehicleTable [source] ) end ) addEventHandler( 'onPlayerQuit',root, function ( ) if isElement ( VehicleTable [ source ] ) then destroyElement( VehicleTable [ source ] ) VehicleTable [ source ] = nil end end ) Edited January 28, 2017 by #_iMr.[E]coo Link to comment
' A F . Posted January 28, 2017 Share Posted January 28, 2017 @KinG_Himoo12 العفو حيآك الله 1 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