^iiEcoo'x_) Posted May 30, 2017 Share Posted May 30, 2017 السلام عليكم ورحمة الله وبركاته عندي مشكلة , صار لي ساعة عليها _ المهم المشكلة إنه مستدعي بيانات الاعب بس ما يجيبهن بقريد ليست aServer Side local aSelect = executeSQLQuery ( 'SELECT * FROM CreateSystem WHERE aSerial_ =? ' , aSerial_ ) triggerClientEvent ( source , 'Attention' , source , aSelect ) aClientSide addEvent ( 'Attention' , true ) addEventHandler ( 'Attention' , root , function ( aSelect ) guiGridListClear ( GUIEditor2.gridlist[2] ) for i , v in ipairs ( aSelect ) do local aRow_ = guiGridListAddRow( GUIEditor2.gridlist[2] ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , false , false ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 2 , aSelect[i]['aInfos_'] , false , false ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 2 , aSelect[i]['aInfos_'] ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aSerial_'] ) end end ) Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 aClientSide_ addEvent ( 'Attention' , true ) addEventHandler ( 'Attention' , root , function ( aSelect ) guiGridListClear ( GUIEditor2.gridlist[2] ) for i , v in ipairs ( aSelect ) do local aRow_ = guiGridListAddRow( GUIEditor2.gridlist[2] ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , false , false ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 1 , {aSelect[i]['aName_'],aSelect[i]['aSerial_']} ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 2 , aSelect[i]['aInfos_'] , false , false ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 2 , aSelect[i]['aInfos_'] ) end end ) Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 Just now, #_iMr.[E]coo said: سوف أقوم بتجربته ! فلتفعل ! Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 9 minutes ago, iMr.WiFi..! said: فلتفعل ! اسمع ضهرلي خطأ مدري كيف executeSQLQuery ( 'INSERT INTO Attention ( aSerial_ , aName_ , aInfos_ ) VALUES ( ? , ? , ? ) ', aSerial_ , aName_ , aInfos_ ) يقول هذا aInfos_ غير موجود Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 Just now, #_iMr.[E]coo said: اسمع ضهرلي خطأ مدري كيف executeSQLQuery ( 'INSERT INTO Attention ( aSerial_ , aName_ , aInfos_ ) VALUES ( ? , ? , ? ) ', aSerial_ , aName_ , aInfos_ ) يقول هذا aInfos_ غير موجود تأكد من كولمن انفوس او قيمة انفوس نفسها Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 تأكدت من الكوليمن , وتأكدت من القيمة @iMr.WiFi..! أعطيك المود تشوف مشكلته ؟ Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 أين الخبراء .؟ @Abdul KariM Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 34 minutes ago, #_iMr.[E]coo said: تأكدت من الكوليمن , وتأكدت من القيمة @iMr.WiFi..! أعطيك المود تشوف مشكلته ؟ اطرح الكود وماخلفه عشان نقدر نساعدك .. Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 2 minutes ago, #_iMr.[E]coo said: ورا شغل سنين ذذ عاد مدري كيف بساعدك , يمكن اساعدك تخاطرياً ؟ Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 2 minutes ago, iMr.WiFi..! said: عاد مدري كيف بساعدك , يمكن اساعدك تخاطرياً ؟ إيش أعطيك بالضبط ؟ , لانه وراه 300 سطر Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 لا انا اقصد الكود نفسه يعني لو هو داخل حدث وريني الحدث بالكامل عشان اقدر احله : @ Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 addEvent ( 'CreateAtt' , true ) addEventHandler ( 'CreateAtt' , root , function ( aPlr_ , aName_ , aInfos_ ) local aPlr_ = getPlayerFromName ( aPlr_ ) local aSerial_ = getPlayerSerial ( aPlr_ ) local result = executeSQLQuery ( 'SELECT aSerial_ , aName_ , aInfos FROM CreateSystem WHERE aSerial_ =? ' , aSerial_ ) executeSQLQuery ( 'INSERT INTO Attention ( aSerial_ , aName_ , aInfos ) VALUES ( ? , ? , ? ) ', aSerial_ , aName_ , aInfos_ ) end end ) Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 Attention = هو نفس الجدول الي انت تبيه ؟ , ولا لخبطت هو والجدول CreateSystem Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 عدلته نفس الخطأ ^ شوف الدي بوق https://e.top4top.net/p_515xx20s1.png Link to comment
iMr.WiFi..! Posted May 30, 2017 Share Posted May 30, 2017 1 minute ago, #_iMr.[E]coo said: عدلته نفس الخطأ ^ شوف الدي بوق https://e.top4top.net/p_515xx20s1.png الديبق يقول انه مافي كولمن بذا الاسم : aInfos تأكد منه الله يرضى عنك + اطرح كود انشاء الجدول Link to comment
^iiEcoo'x_) Posted May 30, 2017 Author Share Posted May 30, 2017 قسم انه جنني executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS Attention ( aSerial_ TEXT , aName_ TEXT ,aInfos TEXT ) ') Link to comment
#STZ Posted May 31, 2017 Share Posted May 31, 2017 executeSQLQuery("CREATE TABLE IF NOT EXISTS Attention ( aSerial_ INTEGER , aName_ TEXT ,aInfos TEXT )") اعتقد هيك الصح Link to comment
^iiEcoo'x_) Posted May 31, 2017 Author Share Posted May 31, 2017 لم يزبطط ي عيال ظهرلي خطأ شوفوا كود وضع الداتا عالرو guiGridListSetItemDataWithKey ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , 'name' ) guiGridListSetItemDataWithKey ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aSerial_'] , 'serial' ) كود جلب الداتا من الرو local aName_ = guiGridListGetItemDataWithKey ( GUIEditor2.gridlist[2] , selectedRow , 1 , 'name' ) local aSerial_ = guiGridListGetItemDataWithKey ( GUIEditor2.gridlist[2] , selectedRow , 1 , 'serial' ) بس أطلع نص بالشتت ب الإسم والسريال يطلعلي nil @!#NssoR_) , @Abdul KariM , Link to comment
^iiEcoo'x_) Posted May 31, 2017 Author Share Posted May 31, 2017 addEvent ( 'Attention' , true ) addEventHandler ( 'Attention' , root , function ( aSelect ) guiGridListClear ( GUIEditor2.gridlist[2] ) for i , v in ipairs ( aSelect ) do local aRow_ = guiGridListAddRow( GUIEditor2.gridlist[2] ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , false , false ) guiGridListSetItemDataWithKey ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , 'name' ) guiGridListSetItemDataWithKey ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aSerial_'] , 'serial' ) end end ) if ( guiGridListGetSelectedItem ( GUIEditor2.gridlist[2] ) ~= -1 ) then local selectedRow, selectedColumn = guiGridListGetSelectedItem ( GUIEditor2.gridlist[2] ) local aName_ = guiGridListGetItemDataWithKey ( GUIEditor2.gridlist[2] , selectedRow , 1 , 'name' ) local aSerial_ = guiGridListGetItemDataWithKey ( GUIEditor2.gridlist[2] , selectedRow , 1 , 'serial' ) السورس كود حاطه & Link to comment
Abdul KariM Posted May 31, 2017 Share Posted May 31, 2017 addEvent ( 'Attention' , true ) addEventHandler ( 'Attention' , root , function ( aSelect ) guiGridListClear ( GUIEditor2.gridlist[2] ) for i , v in ipairs ( aSelect ) do local aRow_ = guiGridListAddRow( GUIEditor2.gridlist[2] ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , false , false ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 1 , { sName = aSelect[i]['aName_'] , sSerial = aSelect[i]['aSerial_'] } ) end end ) if ( guiGridListGetSelectedItem ( GUIEditor2.gridlist[2] ) ~= -1 ) then local selectedRow, selectedColumn = guiGridListGetSelectedItem ( GUIEditor2.gridlist[2] ) local aName_ = guiGridListGetItemData ( GUIEditor2.gridlist[2] , selectedRow , 1 ).sName local aSerial_ = guiGridListGetItemData ( GUIEditor2.gridlist[2] , selectedRow , 1 ).sSerial Link to comment
^iiEcoo'x_) Posted May 31, 2017 Author Share Posted May 31, 2017 15 minutes ago, Abdul KariM said: addEvent ( 'Attention' , true ) addEventHandler ( 'Attention' , root , function ( aSelect ) guiGridListClear ( GUIEditor2.gridlist[2] ) for i , v in ipairs ( aSelect ) do local aRow_ = guiGridListAddRow( GUIEditor2.gridlist[2] ) guiGridListSetItemText ( GUIEditor2.gridlist[2] , aRow_ , 1 , aSelect[i]['aName_'] , false , false ) guiGridListSetItemData ( GUIEditor2.gridlist[2] , aRow_ , 1 , { sName = aSelect[i]['aName_'] , sSerial = aSelect[i]['aSerial_'] } ) end end ) if ( guiGridListGetSelectedItem ( GUIEditor2.gridlist[2] ) ~= -1 ) then local selectedRow, selectedColumn = guiGridListGetSelectedItem ( GUIEditor2.gridlist[2] ) local aName_ = guiGridListGetItemData ( GUIEditor2.gridlist[2] , selectedRow , 1 ).sName local aSerial_ = guiGridListGetItemData ( GUIEditor2.gridlist[2] , selectedRow , 1 ).sSerial شكرا وملييون ترليون شكرا مسوي بالسكل , لما احدد من قريد ليست يحذف الي اخترته , بس هو يحذف كل بيانات الاعب , بالترايفقر مسوي اعطي تنبيه للاعب , بس لما اختار من قريد ليست التنبيه واأحذفه يحذف كل البيانات , ابيه يحذف هذا التنبيه فقط triggerServerEvent ( 'ssss' , localPlayer , aName_ , aSerial_ ) وبالسيرفر addEvent ( 'DeleteAttention' , true ) addEventHandler ( 'DeleteAttention' , root , function ( aName_ , aSerial_ ) executeSQLQuery ( 'DELETE FROM Attention WHERE aSerial_ =?' , aSerial_ , aName_ ) local result = executeSQLQuery ( 'SELECT * FROM Attention WHERE aSerial_ =? ' , aSerial_ ) triggerClientEvent ( source , 'Attention' , source , result ) end ) Link to comment
Abdul KariM Posted May 31, 2017 Share Posted May 31, 2017 executeSQLQuery ( 'DELETE FROM Attention WHERE aSerial_ =? AND aName_ =?' , aSerial_ , aName_ ) 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