+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 Just now, iMr.WiFi..! said: يب كان في خطأ عدله + ما زبط لما احد يرسل ما يجيني بالجريد Link to comment
iMr.WiFi..! Posted September 21, 2017 Share Posted September 21, 2017 الحين انت تبيه يظهر لك ولا يظهر للاعب الي ارسل ؟؟ Link to comment
+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 2 minutes ago, iMr.WiFi..! said: الحين انت تبيه يظهر لك ولا يظهر للاعب الي ارسل ؟؟ يظهر لي انا زي الرنت عشان افعل له Link to comment
Rakan# Posted September 21, 2017 Share Posted September 21, 2017 سم ي الكفو -- Client addEvent ( 'AddInGrid' , true ) addEventHandler ( 'AddInGrid' , root , function( Table ) guiGridListClear( teamList ) for i, v in ipairs( Table ) do local Row = guiGridListAddRow( grdnk ) local plr = getPlayerFromName( source ) guiGridListSetItemText( grdnk, Row, 1, v.Serial , false, false ) guiGridListSetItemText( grdnk, Row, 2, v.NK , false, false ) guiGridListSetItemText( grdnk, Row, 3, v.NKC , false, false ) guiGridListSetItemColor( grdnk, Row, 1, 0, 255, 255 ) guiGridListSetItemColor( grdnk, Row, 2, 0, 255, 255 ) guiGridListSetItemColor( grdnk, Row, 3, 0, 255, 255 ) end end ) addEventHandler("onClientGUIClick", root, function( ) if source == con then local NK1 , NKC1 = guiGetText( nkedit1 ) , guiGetText( nkedit2 ) if ( NK1 ~= '' and NK1 ~= ' ' and NKC1 ~= '' and NKC1 ~= ' ' and NK1 ~= 'إسم التاج ؟' and NKC1 ~= 'كود اللون ؟' ) then triggerServerEvent ( 'add' , localPlayer , NK1 , NKC1 ) else outputChatBox( " الرجاء كتابة تاج و كود لون ", 255, 0, 0, true ) end end end ) -- Server addEventHandler("onResourceStart", root, function() executeSQLQuery( "CREATE TABLE IF NOT EXISTS aSave ( NK, NKC, Serial )" ) setTimer( function() triggerEvent ('Refresh_',root ) end,2000,1) end ) addEvent("add", true) addEventHandler("add", root, function( NK1, NKC1 ) if NK1 and NKC1 then local aSerial = getPlayerSerial ( source ) executeSQLQuery( "INSERT INTO aSave ( NK, NKC, Serial ) VALUES( ? , ? , ? )", NK1, NKC1, aSerial ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do triggerEvent ( 'Refresh_' , v ) end end end ) addEvent ( 'Refresh_' , true ) addEventHandler ( 'Refresh_' , root , function () local aSQL2 = executeSQLQuery ( 'SELECT * FROM aSave') if ( #aSQL2 ~= 0 ) then triggerClientEvent ( root, 'AddInGrid' , root , aSQL2 ) end end ) addEvent("Done", true) addEventHandler("Done", root, function( NK1 ) executeSQLQuery ( "DELETE FROM aSave WHERE NK = ?", NK1 ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do triggerEvent ( 'Refresh_' , v ) end end ) Link to comment
+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 3 minutes ago, Rakan# said: سم ي الكفو -- Client addEvent ( 'AddInGrid' , true ) addEventHandler ( 'AddInGrid' , root , function( Table ) guiGridListClear( teamList ) for i, v in ipairs( Table ) do local Row = guiGridListAddRow( grdnk ) local plr = getPlayerFromName( source ) guiGridListSetItemText( grdnk, Row, 1, v.Serial , false, false ) guiGridListSetItemText( grdnk, Row, 2, v.NK , false, false ) guiGridListSetItemText( grdnk, Row, 3, v.NKC , false, false ) guiGridListSetItemColor( grdnk, Row, 1, 0, 255, 255 ) guiGridListSetItemColor( grdnk, Row, 2, 0, 255, 255 ) guiGridListSetItemColor( grdnk, Row, 3, 0, 255, 255 ) end end ) addEventHandler("onClientGUIClick", root, function( ) if source == con then local NK1 , NKC1 = guiGetText( nkedit1 ) , guiGetText( nkedit2 ) if ( NK1 ~= '' and NK1 ~= ' ' and NKC1 ~= '' and NKC1 ~= ' ' and NK1 ~= 'إسم التاج ؟' and NKC1 ~= 'كود اللون ؟' ) then triggerServerEvent ( 'add' , localPlayer , NK1 , NKC1 ) else outputChatBox( " الرجاء كتابة تاج و كود لون ", 255, 0, 0, true ) end end end ) -- Server addEventHandler("onResourceStart", root, function() executeSQLQuery( "CREATE TABLE IF NOT EXISTS aSave ( NK, NKC, Serial )" ) setTimer( function() triggerEvent ('Refresh_',root ) end,2000,1) end ) addEvent("add", true) addEventHandler("add", root, function( NK1, NKC1 ) if NK1 and NKC1 then local aSerial = getPlayerSerial ( source ) executeSQLQuery( "INSERT INTO aSave ( NK, NKC, Serial ) VALUES( ? , ? , ? )", NK1, NKC1, aSerial ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do triggerEvent ( 'Refresh_' , v ) end end end ) addEvent ( 'Refresh_' , true ) addEventHandler ( 'Refresh_' , root , function () local aSQL2 = executeSQLQuery ( 'SELECT * FROM aSave') if ( #aSQL2 ~= 0 ) then triggerClientEvent ( root, 'AddInGrid' , root , aSQL2 ) end end ) addEvent("Done", true) addEventHandler("Done", root, function( NK1 ) executeSQLQuery ( "DELETE FROM aSave WHERE NK = ?", NK1 ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do triggerEvent ( 'Refresh_' , v ) end end ) ينفع اخلي مكان السيريال اسم اللاعب Link to comment
Rakan# Posted September 21, 2017 Share Posted September 21, 2017 Just now, Source|> said: ينفع اخلي مكان السيريال اسم اللاعب لا , الا لو اضفت داخل السكل عمود اضافي لل اسم , Link to comment
+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 2 minutes ago, Rakan# said: لا , الا لو اضفت داخل السكل عمود اضافي لل اسم , يعني كذا addEventHandler("onResourceStart", root, function() executeSQLQuery( "CREATE TABLE IF NOT EXISTS aSave ( NK, NKC, name )" ) end ) addEvent("add", true) addEventHandler("add", root, function( NK1, NKC1 ) if NK1 and NKC1 then local aName = getPlayerName( source ) executeSQLQuery( "INSERT INTO aSave ( NK, NKC, name ) VALUES( ? , ? , ? )", NK1, NKC1, aName ) triggerEvent ( 'Refresh_' , root ) end end ) addEvent ( 'Refresh_' , true ) addEventHandler ( 'Refresh_' , root , function () local aSQL2 = executeSQLQuery ( 'SELECT * FROM aSave WHERE name = ? ', aName ) if ( #aSQL2 ~= 0 ) then triggerClientEvent ( root, 'AddInGrid' , root , aSQL2 ) end end ) addEvent("Donen", true) addEventHandler("Donen", root, function( ) executeSQLQuery ( "DELETE FROM aSave" ) triggerEvent ( 'Refresh_' , root ) end ) Link to comment
Rakan# Posted September 21, 2017 Share Posted September 21, 2017 (edited) addEventHandler("onResourceStart", root, function() executeSQLQuery( "CREATE TABLE IF NOT EXISTS aSave ( NK, NKC, Serial, Name )" ) setTimer( function() triggerEvent ('Refresh_',root ) end,2000,1) end ) addEvent("add", true) addEventHandler("add", root, function( NK1, NKC1 ) if NK1 and NKC1 then local aSerial = getPlayerSerial ( source ) executeSQLQuery( "INSERT INTO aSave ( NK, NKC, Serial, Name ) VALUES( ? , ? , ? , ?)", NK1, NKC1, aSerial, Name ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do triggerEvent ( 'Refresh_' , v ) end end end ) addEvent ( 'Refresh_' , true ) addEventHandler ( 'Refresh_' , root , function () local aSQL2 = executeSQLQuery ( 'SELECT * FROM aSave') if ( #aSQL2 ~= 0 ) then triggerClientEvent ( root, 'AddInGrid' , root , aSQL2 ) end end ) يستحسن انك ماتشيل السيريال + Refresh_ بـ لازم تخليه SELECT * FROM aSave بدون WHERE Name مثلا عشان يطلع لك كل اللي ارسلوا ! Edited September 21, 2017 by Rakan# Link to comment
Adham Posted September 21, 2017 Share Posted September 21, 2017 Just now, iMr.WiFi..! said: عدله لذا : addEvent("Done", true) addEventHandler("Done", root, function( NK1 ) executeSQLQuery ( "DELETE FROM aSave WHERE NK = ?", NK1 ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do triggerEvent ( 'Refresh_' , v ) end end ) وقلي لو زبط ولا @_@ + اطرح الاخطاء الي تجيك بالديبق نقصك تحقق ان NK1 موجود بالقاعدة. Link to comment
+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 1 minute ago, Deativated said: نقصك تحقق ان NK1 موجود بالقاعدة. انا ابيه يمسح الروات كلها بس ما ظبط addEvent("Donen", true) addEventHandler("Donen", root, function( ) executeSQLQuery ( "DELETE FROM aSave" ) triggerEvent ( 'Refresh_' , root ) end ) Link to comment
Rakan# Posted September 21, 2017 Share Posted September 21, 2017 تبيه يصفر القاعده يعني ؟ Link to comment
Rockyz Posted September 21, 2017 Share Posted September 21, 2017 (edited) 1 hour ago, Source|> said: انا ابيه يمسح الروات كلها بس ما ظبط addEvent("Donen", true) addEventHandler("Donen", root, function( ) executeSQLQuery ( "DELETE FROM aSave" ) triggerEvent ( 'Refresh_' , root ) end ) addEvent ( 'Donen', true ) addEventHandler ( 'Donen', root, function ( ) executeSQLQuery ( 'DROP TABLE aSave' ) executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSave ( NK, NKC, Serial, Name )' ) triggerEvent ( 'Refresh_', root ) end ) او addEvent ( 'Donen', true ) addEventHandler ( 'Donen', root, function ( ) executeSQLQuery ( 'DELETE * FROM aSave' ) triggerEvent ( 'Refresh_', root ) end ) الأثنين صحيحين Edited September 21, 2017 by #,+( _xiRoc[K]; > Link to comment
+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 1 hour ago, #,+( _xiRoc[K]; > said: addEvent ( 'Donen', true ) addEventHandler ( 'Donen', root, function ( ) executeSQLQuery ( 'DROP TABLE aSave' ) executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSave ( NK, NKC, Serial, Name )' ) triggerEvent ( 'Refresh_', root ) end ) او addEvent ( 'Donen', true ) addEventHandler ( 'Donen', root, function ( ) executeSQLQuery ( 'DELETE * FROM aSave' ) triggerEvent ( 'Refresh_', root ) end ) الأثنين صحيحين ممكن طلب ثاني هذا لا يعمل addEvent ( 'AddInGrid' , true ) addEventHandler ( 'AddInGrid' , root , function( Table ) guiGridListClear( grdnk ) for i, v in ipairs( Table ) do local Row = guiGridListAddRow( grdnk ) guiGridListSetItemText( grdnk, Row, 1, getPlayerName( source ) , false, false ) -- هنا guiGridListSetItemText( grdnk, Row, 2, v.NK , false, false ) guiGridListSetItemText( grdnk, Row, 3, v.NKC , false, false ) guiGridListSetItemColor( grdnk, Row, 1, 0, 255, 255 ) guiGridListSetItemColor( grdnk, Row, 2, 0, 255, 255 ) guiGridListSetItemColor( grdnk, Row, 3, 0, 255, 255 ) end end ) Link to comment
Abdul KariM Posted September 21, 2017 Share Posted September 21, 2017 getPlayerName ( source ) > v.Name Link to comment
+Source|> Posted September 21, 2017 Author Share Posted September 21, 2017 6 minutes ago, Abdul KariM said: getPlayerName ( source ) > v.Name مافي v.Name 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