Adham Posted February 19, 2017 Share Posted February 19, 2017 سلام عليكم انا ابي اسوي لما يحدد كومب بوكس ويكتب في ايديت ويكتب في ميمو ويدوس علي " زر " يجي الكلام بالقريد لست ويتحفظ الكود م ظبت ك -- سرفر executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `RentSystem` (text,CardType,Adham) ' ) addEvent('Handler', true ) addEventHandler('Handler' , getRootElement ( ) , function ( text, CardType, Adham ) Value = executeSQLQuery( 'SELECT * FROM RentSystem' ) if ( #Value ~= 0 ) then triggerClientEvent ( source , 'lol' , source , Value, text, CardType, Adham ) end end ) -- كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Send ) then local Text = guiGetText ( Edit1 ) local CardType = guiComboBoxGetItemText(com, guiComboBoxGetSelected(com)) local Adham = guiGetText ( memo ) if Text == "" or CardType == "" or Adham == "" then return end triggerServerEvent ( "Handler", localPlayer, Text, Adham, CardType ) end end ) addEvent ( "lol", true ) addEventHandler ( "lol", root, function ( table ) guiGridListClear(GridList_) for i, v in ipairs (table) do local aRow = guiGridListAddRow( GUIEditor.gridlist[2] ) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].text,false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].CardType,false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].Adham,false,false) end end ) Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 -- سرفر executeSQLQuery( ' CREATE TABLE IF NOT EXISTS RentSystem(text TEXT,CardType TEXT,Adham TEXT) ' ) addEvent('Handler', true ) addEventHandler('Handler' , getRootElement ( ) , function ( text, CardType, Adham ) if ( text ) or ( CardType) or (Adham) then executeSQLQuery("INSERT INTO RentSystem(text,CardType,Adham) VALUES(?,?,?)", toString(text), toString(CardType), toString(Adham) ) end Value = executeSQLQuery( 'SELECT * FROM RentSystem' ) if ( #Value ~= 0 ) then triggerClientEvent ( source , 'lol' , source , text, CardType, Adham ) end end ) -- كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Send ) then local Text = guiGetText ( Edit1 ) local CardType = guiComboBoxGetItemText(com, guiComboBoxGetSelected(com)) local Adham = guiGetText ( memo ) if Text == "" or CardType == "" or Adham == "" then return end triggerServerEvent ( "Handler", localPlayer, Text, Adham, CardType ) end end ) addEvent ( "lol", true ) addEventHandler ( "lol", root, function ( text,cardtype,adham ) guiGridListClear(GridList_) for i, v in ipairs (table) do local aRow = guiGridListAddRow( GUIEditor.gridlist[2] ) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, toString(text),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, toString(cardtype),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, toString(adham),false,false) end end ) بتوفيق : ) Link to comment
' A F . Posted February 19, 2017 Share Posted February 19, 2017 --- Server Side executeSQLQuery( "CREATE TABLE IF NOT EXISTS `RentSystem` (text,CardType,Adham)" ) returnTable = function ( ) local sqlite = executeSQLQuery ( "SELECT * FROM RentSystem" ); if ( sqlite and type ( sqlite ) == "table" and #sqlite > 0 ) then return sqlite end end addEvent("Handler", true ) addEventHandler("Handler" , getRootElement ( ) , function ( text, CardType, Adham ) if ( text and CardType and Adham ) then executeSQLQuery ( "INSERT INTO RentSystem (text,CardType,Adham) VALUES (?,?,?)",text, CardType, Adham ) triggerClientEvent ( source , "lol" , source , returnTable ( ) ) end end ) --- Client Side addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == Send ) then triggerServerEvent ( "Handler" , localPlayer , guiGetText ( Edit1 ) , guiGetText ( memo ) , guiComboBoxGetItemText(com,guiCheckBoxGetSelected(com)) ); end end ) addEvent ( "lol" , true ) addEventHandler ( "lol" , root , function ( Table ) guiGridListClear(GridList_) for i,v in ipairs ( Table ) do local row = guiGridListAddRow ( GridList_ ); guiGridListSetItemText ( GridList_ , row , 1 , tostring ( v["text"] ) , false , false ) guiGridListSetItemText ( GridList_ , row , 2 , tostring ( v["CardType"] ) , false , false ) guiGridListSetItemText ( GridList_ , row , 3 , tostring ( v["Adham"] ) , false , false ) end end ); Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 الكودين مب بيجيو في القريد لست Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 ^ تأكد من تعديل الاسماء حق كود ديفولت Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 Default م يجي خطأ كودك بالدي بق ولانها م يجي بالقريد لست الكلام مستر واي فاي كودك يجي خطأ بالسجل Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 (edited) جرب ذذ : ) -- سرفر executeSQLQuery( ' CREATE TABLE IF NOT EXISTS RentSystem(text TEXT,CardType TEXT,Adham TEXT) ' ) addEvent('Handler', true ) addEventHandler('Handler' , root , function ( text, CardType, Adham ) if ( text ) then executeSQLQuery("INSERT INTO RentSystem(text,CardType,Adham) VALUES(?,?,?)", text, CardType, Adham ) end local Value = executeSQLQuery( 'SELECT * FROM RentSystem' ) if ( #Value >= 0 ) and (type(Value) == "table" ) then triggerClientEvent ( source , 'lol' , source , text, CardType, Adham ) end end ) -- كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Send ) then local Text = guiGetText ( Edit1 ) local CardType = guiComboBoxGetItemText(com, guiComboBoxGetSelected(com)) local Adham = guiGetText ( memo ) if Text == "" or CardType == "" or Adham == "" then return end triggerServerEvent ( "Handler", localPlayer, Text, CardType, Adham ) end end ) addEvent ( "lol", true ) addEventHandler ( "lol", root, function ( text,cardtype,adham ) guiGridListClear(GridList_) for i, v in ipairs (table) do local aRow = guiGridListAddRow( GUIEditor.gridlist[2] ) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(text),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(cardtype),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(adham),false,false) end end ) Edited February 19, 2017 by iMr.WiFi..! Link to comment
#Soking Posted February 19, 2017 Share Posted February 19, 2017 @iMr.WiFi..! كودك غلط وين ال table ال انت مسوي له لوب Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 م يجي في القريد لست كمان .. Database query failed: table RentSysteam has no columns named text Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 @#Soking يمكن هو مسويه بس ما حطه : ( Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 Database query failed: table RentSysteam has no columns named text Link to comment
' A F . Posted February 19, 2017 Share Posted February 19, 2017 @Deativated لو تقدر اطرح السكربت او ارسله خاص Link to comment
iMr.WiFi..! Posted February 19, 2017 Share Posted February 19, 2017 -- سرفر executeSQLQuery( ' CREATE TABLE IF NOT EXISTS RentSystem(oext TEXT,CardType TEXT,Adham TEXT) ' ) addEvent('Handler', true ) addEventHandler('Handler' , root , function ( oext, CardType, Adham ) if ( oext ) then executeSQLQuery("INSERT INTO RentSystem(oext,CardType,Adham) VALUES(?,?,?)", oext, CardType, Adham ) end local Value = executeSQLQuery( 'SELECT * FROM RentSystem' ) if ( #Value >= 0 ) and (type(Value) == "table" ) then triggerClientEvent ( source , 'lol' , source , oext, CardType, Adham ) end end ) -- كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Send ) then local Text = guiGetText ( Edit1 ) local CardType = guiComboBoxGetItemText(com, guiComboBoxGetSelected(com)) local Adham = guiGetText ( memo ) if Text == "" or CardType == "" or Adham == "" then return end triggerServerEvent ( "Handler", localPlayer, Text, CardType, Adham ) end end ) addEvent ( "lol", true ) addEventHandler ( "lol", root, function ( text,cardtype,adham ) guiGridListClear(GridList_) for i, v in ipairs (table) do local aRow = guiGridListAddRow( GUIEditor.gridlist[2] ) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(text),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(cardtype),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(adham),false,false) end end ) Link to comment
' A F . Posted February 19, 2017 Share Posted February 19, 2017 @iMr.WiFi..! line 32 table مو معرف . Link to comment
#Soking Posted February 19, 2017 Share Posted February 19, 2017 (edited) 2 minutes ago, iMr.WiFi..! said: -- سرفر executeSQLQuery( ' CREATE TABLE IF NOT EXISTS RentSystem(oext TEXT,CardType TEXT,Adham TEXT) ' ) addEvent('Handler', true ) addEventHandler('Handler' , root , function ( oext, CardType, Adham ) if ( oext ) then executeSQLQuery("INSERT INTO RentSystem(oext,CardType,Adham) VALUES(?,?,?)", oext, CardType, Adham ) end local Value = executeSQLQuery( 'SELECT * FROM RentSystem' ) if ( #Value >= 0 ) and (type(Value) == "table" ) then triggerClientEvent ( source , 'lol' , source , oext, CardType, Adham ) end end ) -- كلنت addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == Send ) then local Text = guiGetText ( Edit1 ) local CardType = guiComboBoxGetItemText(com, guiComboBoxGetSelected(com)) local Adham = guiGetText ( memo ) if Text == "" or CardType == "" or Adham == "" then return end triggerServerEvent ( "Handler", localPlayer, Text, CardType, Adham ) end end ) addEvent ( "lol", true ) addEventHandler ( "lol", root, function ( text,cardtype,adham ) guiGridListClear(GridList_) for i, v in ipairs (table) do local aRow = guiGridListAddRow( GUIEditor.gridlist[2] ) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(text),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(cardtype),false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, table[i].tostring(adham),false,false) end end ) اصلن ماراح يزبط ولو افترضنا وجود تيبول لما بترسل بتنضاف ومابتظهر لاي احد غير ال ارسله Edited February 19, 2017 by #Soking Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 نفس الخطأ ببعته لك خاص Link to comment
#Soking Posted February 19, 2017 Share Posted February 19, 2017 2 minutes ago, Deativated said: نفس الخطأ ببعته لك خاص بالنسبه للسكل غير اسم السكل وجرب RentSystem Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 في اي سطر اغيره ؟ م ظبت برده Link to comment
#Soking Posted February 19, 2017 Share Posted February 19, 2017 اي شي اسمه RentSystem غير مثلا ل RentSystem_ Link to comment
#Soking Posted February 19, 2017 Share Posted February 19, 2017 اذن اكوادك غلط ووانت مو حاط كل الاكواد و محسسني انك معك المواد ال ماحد يقدر يسويها برب Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 (edited) 2 minutes ago, #Soking said: اذن اكوادك غلط ووانت مو حاط كل الاكواد و محسسني انك معك المواد ال ماحد يقدر يسويها برب وش تقول انت ؟ عطيت لك الدي بق فوق Database query failed: table RentSysteam has no columns named text Edited February 19, 2017 by Deativated Link to comment
' A F . Posted February 19, 2017 Share Posted February 19, 2017 ماعليش اخوي الخطا كان مني . شيل الكود حق onClientGUIClick وبدله بهاذا addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == Send ) then triggerServerEvent ( "Handler" , localPlayer , guiGetText ( Edit1 ) , guiGetText ( Memo ) , guiComboBoxGetItemText(ComBox ,guiComboBoxGetSelected(ComBox)) ); end end ) Link to comment
Adham Posted February 19, 2017 Author Share Posted February 19, 2017 م ظبت دي بق http://imgur.com/a/Yb4LAhttp://imgur.com/a/Yb4LA 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