' A F . Posted February 19, 2017 Posted February 19, 2017 -- # Client Side addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == Send ) then triggerServerEvent ( "Handler" , localPlayer , guiGetText ( Edit1 ) , guiGetText ( Memo ) , guiComboBoxGetItemText(ComBox ,guiComboBoxGetSelected(ComBox)) ); end end ) addEvent ( "lol" , true ) addEventHandler ( "lol" , root , function ( Table ) guiGridListClear(GUIEditor.gridlist[3]) for i,v in ipairs ( Table ) do local row = guiGridListAddRow (GUIEditor.gridlist[3]); guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 1 , tostring ( v["text"] ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 2 , tostring ( v["CardType"] ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 3 , tostring ( v["Adham"] ) , false , false ) end end ); --- # 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 )
Adham Posted February 19, 2017 Author Posted February 19, 2017 نفس الدي بق البعتهولك فوق لين اضعط علي زرار Send يجي لي دي بق البعته لك فوق http://imgur.com/a/Yb4LA
#Soking Posted February 19, 2017 Posted February 19, 2017 @Default ليه طيب ترسل التيبل كله كذا لو فرضنا ان فيه الف رو مو ممكن يجيب لاق و عليماعتقد سطر ٣٧ خطء
iMr.WiFi..! Posted February 19, 2017 Posted February 19, 2017 جرب الكود -- # Client Side addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == Send ) then triggerServerEvent ( "Handler" , localPlayer , guiGetText ( Edit1 ) , guiGetText ( Memo ) , guiComboBoxGetItemText(ComBox ,guiComboBoxGetSelected(ComBox)) ); end end ) addEvent ( "lol" , true ) addEventHandler ( "lol" , root , function ( Table ) guiGridListClear(GUIEditor.gridlist[3]) for i,v in ipairs ( Table ) do local row = guiGridListAddRow (GUIEditor.gridlist[3]); guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 1 , tostring ( v["deafult"] ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 2 , tostring ( v["CardType"] ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 3 , tostring ( v["Adham"] ) , false , false ) end end ); --- # Server Side executeSQLQuery( "CREATE TABLE IF NOT EXISTS `RentSystem` (deafult TEXT,CardType TEXT,Adham TEXT)" ) 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 ( deafult, CardType, Adham ) if ( deafult and CardType and Adham ) then executeSQLQuery ( "INSERT INTO RentSystem (deafult,CardType,Adham) VALUES (?,?,?)",deafult, CardType, Adham ) triggerClientEvent ( source , "lol" , source , returnTable ( ) ) end end )
Adham Posted February 19, 2017 Author Posted February 19, 2017 (edited) نفس الدي بقي Soking مستر واي فاي جربته ونفس الدي بق Edited February 19, 2017 by Deativated
#Soking Posted February 19, 2017 Posted February 19, 2017 اصلن في اخطاء في اسماء الكولمنات لاحظ كلمه تكست سطر ٢٣
iMr.WiFi..! Posted February 19, 2017 Posted February 19, 2017 (edited) 1 minute ago, #Soking said: اصلن في اخطاء في اسماء الكولمنات لاحظ كلمه تكست سطر ٢٣ طيب هذا الي عدلته انا : ( Edited February 19, 2017 by iMr.WiFi..! 1
#Soking Posted February 19, 2017 Posted February 19, 2017 Just now, iMr.WiFi..! said: طيب صلحة حضرتك *) جوال ض
' A F . Posted February 19, 2017 Posted February 19, 2017 7 minutes ago, #Soking said: @Default ليه طيب ترسل التيبل كله كذا لو فرضنا ان فيه الف رو مو ممكن يجيب لاق و عليماعتقد سطر ٣٧ خطء ماعندي طريقة غير كذا ولو فيه طريقة ليت تفدينا .
#Soking Posted February 19, 2017 Posted February 19, 2017 1 minute ago, خلف said: اطرح كل اكوادك مو شرط
Adham Posted February 19, 2017 Author Posted February 19, 2017 (edited) المشكله مب في كل الكود اللوحة !! المشكله بعتها لك فوق في الصوره التيجي لي في الدي بق لا مب معدل علي شي http://imgur.com/a/Yb4LA Edited February 19, 2017 by Deativated
iMr.WiFi..! Posted February 19, 2017 Posted February 19, 2017 @#Soking بسيطة حق ال الف طلب : * يسوي لما المستخدم يطلب بعد ما يستقبل الترايقر قبل لا يسوي Insert : ( يتحقق من عدد الداتا زي كذا local sqlite = executeSQLQuery ( "SELECT * FROM RentSystem" ); if #sqlite == 50 then -- يسوي قاعدة جديدة : )
#Soking Posted February 19, 2017 Posted February 19, 2017 3 minutes ago, iMr.WiFi..! said: @#Soking بسيطة حق ال الف طلب : * يسوي لما المستخدم يطلب بعد ما يستقبل الترايقر قبل لا يسوي Insert : ( يتحقق من عدد الداتا زي كذا local sqlite = executeSQLQuery ( "SELECT * FROM RentSystem" ); if #sqlite == 50 then -- يسوي قاعدة جديدة : ) خخخخخ يقدر يرجع يضيف الكلام بدون مايفرغ القريد و يطرح السكل تاني
Adham Posted February 19, 2017 Author Posted February 19, 2017 (edited) هكذا Soking ? executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `RentSystem` (text,CardType,Adham) ' ) addEvent ( "Handler", true ) addEventHandler ( "Handler", root, function ( ) local Reaslut = executeSQLQuery( ' SELECT * FROM `RentSystem` ') if ( type(Reaslut) == "table" and #Reaslut == 0 or notReaslut ) then triggerClientEvent ( source,"AddList", source ) end end ) -- Client addEventHandler ( "onClientGUIClick" , root , function ( ) if ( source == Send ) then triggerServerEvent ( "Handler" , localPlayer , guiGetText ( Edit1 ) , guiGetText ( Memo ) , guiComboBoxGetItemText(ComBox ,guiCheckBoxGetSelected(ComBox)) ); end end ) addEvent( 'AddList', true ) addEventHandler( 'AddList', root, function(Table) guiGridListClear(GUIEditor.gridlist[3]) for i, v in ipairs ( Table ) do local activatedONE = guiGridListAddRow(GUIEditor.gridlist[3]) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 1 , tostring ( v["text"] ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 2 , tostring ( v["CardType"] ) , false , false ) guiGridListSetItemText ( GUIEditor.gridlist[3] , row , 3 , tostring ( v["Adham"] ) , false , false ) end end ); Edited February 19, 2017 by Deativated
#Soking Posted February 19, 2017 Posted February 19, 2017 (edited) لا Edited February 19, 2017 by #Soking
Adham Posted February 19, 2017 Author Posted February 19, 2017 1 minute ago, #Soking said: لا طيب عدلهولي انت
#Soking Posted February 19, 2017 Posted February 19, 2017 مو متحكم في الرو ال تم اضافته انت جالس تتحكم في شي غير موجود سطر ٢٥ اسم الرو و جالس تتحكم في تيبل مو موجود الكلام ماراح يظهر غير ال ارسل خطء في سطر ٧ انا جوال
Adham Posted February 19, 2017 Author Posted February 19, 2017 (edited) 1 minute ago, #Soking said: مو متحكم في الرو ال تم اضافته انت جالس تتحكم في شي غير موجود سطر ٢٥ اسم الرو و جالس تتحكم في تيبل مو موجود الكلام ماراح يظهر غير ال ارسل خطء في سطر ٧ طيب تقدر تعدلهولي انت اذا فاضي ابي اسوي لما يكتب باللايديت ويحدد كومب بوكس ويكتب في الميمو يجي الكلام بالقريد لست اول راو الكتبو بالايديت والتاني الكومب بوكس والتالت الميمو ويتحفظ Edited February 19, 2017 by Deativated
Master_MTA Posted February 19, 2017 Posted February 19, 2017 (edited) executeSQLQuery("CREATE TABLE IF NOT EXISTS RentSystem (text TEXT,CardType TEXT,Adham TEXT)") addEvent('Handler', true ) addEventHandler('Handler' , getRootElement ( ) , function ( ) Value = executeSQLQuery( 'SELECT * FROM RentSystem' ) if ( #Value ~= 0 ) then triggerClientEvent ( source , 'lol' , source ,Value ) end end ) addEvent('inserttotable',true) addEvent('inserttotable',root,function(Text, Adham, CardType) executeSQLQuery("INSERT INTO RentSystem(text,CardType,Adham) VALUES(?,?,?)", Text, CardType, Adham ) triggerEvent('Handler',root) 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 ( "inserttotable", localPlayer, Text, Adham, CardType ) end end ) addEvent ( "lol", true ) addEventHandler ( "lol", root, function ( sql ) guiGridListClear(GUIEditor.gridlist[2]) for i, v in ipairs (sql) do local aRow = guiGridListAddRow( GUIEditor.gridlist[2] ) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 1, sql[i].text,false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 2, sql[i].CardType,false,false) guiGridListSetItemText(GUIEditor.gridlist[2],aRow, 3, sql[i].Adham,false,false) end end ) غير مجرب اولا ثانيا تاكد من اسم الجريد لست 3 تاكد ان الجريد لست فيها 3 كولمن لان لو ما فيها اكيد ما بيجي بالتوفيق بمجرد عمل طلب بيجي طبعا لو تبي تسوي من الكلنت تراقر بيكون كذا triggerServerEvent(' Handler ',localPlayer) + طريقة انشاءك للتيبل غلط بالكليه executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `RentSystem` (text,CardType,Adham) ' ) Edited February 19, 2017 by Master_MTA 1
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