Adham Posted March 10, 2017 Share Posted March 10, 2017 سلأم عليكم انا الأن ابي اسوي لين يخش السررفر , او يسوي login اسمه يجي بالقريد لست وسريالو ويتحفظ المهم م ظبت معي وقعدت اجرب مليون مره م ظبت .. وم في دي بق سرفر executeSQLQuery( "CREATE TABLE IF NOT EXISTS Ha (name,Serial) " ) function ManagePlayrsSystem ( name,Serial,Date ) local name = getPlayerName ( source ):gsub( "#%x%x%x%x%x%x", "" ) local Serial = getPlayerSerial ( source ) Send ( ) end addEventHandler ( "onPlayerJoin", root,ManagePlayrsSystem ) addEventHandler ( "onPlayerLogin", root,ManagePlayrsSystem ) function Send ( ) local SQLListe = executeSQLQuery ( "SELECT * FROM Ha " ) if #SQLListe ~= 0 then triggerClientEvent ( "ManagePlayers:SaveName", root, SQLListe ) end end addEvent ( "RefreshSystem", true ) addEventHandler ( "RefreshSystem", root, Send ) كلنت addEvent ( "ManagePlayers:SaveName", true ) addEventHandler ( "ManagePlayers:SaveName", root, function ( Table ) guiGridListClear( GUIEditor.gridlist[1] ) for i, _ in ipairs( Table ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1,Table[i].Name, false, false) guiGridListSetItemText( GUIEditor.gridlist[1], row, 3,Table[i].Serial, false, false) end end ) addEventHandler( 'onClientResourceStart', resourceRoot, function( ) triggerServerEvent( 'RefreshSystem', localPlayer ) end ) Link to comment
#BrosS Posted March 10, 2017 Share Posted March 10, 2017 name و serial غير معرفين ومابحثت عنهم Link to comment
Adham Posted March 10, 2017 Author Share Posted March 10, 2017 يعني اعرفهم ب جهه الكلنت ؟ ولا سرفر Link to comment
^iiEcoo'x_) Posted March 10, 2017 Share Posted March 10, 2017 Just now, Deativated said: يعني اعرفهم ب جهه الكلنت ؟ ولا سرفر ايش تتعاطى ؟ بكود الاس كيو ال " VALUES " Link to comment
Adham Posted March 10, 2017 Author Share Posted March 10, 2017 1 minute ago, #_iMr.[E]coo said: ايش تتعاطى ؟ بكود الاس كيو ال " VALUES " ماني , فاهم عليك ؟ انا مب عارف اسويها بالسقل بالطريقه " هكذا " انا اعرف اسويها لما يكتب بالايديت مثلا يجي بالقريد لست ويتحفظ الاشياء عن طريق VALUES(???) لاكن الطريقه دي حيرتني . Link to comment
Master_MTA Posted March 10, 2017 Share Posted March 10, 2017 executeSQLQuery( "CREATE TABLE IF NOT EXISTS Ha (name,Serial) " ) function ManagePlayrsSystem ( ) local name = getPlayerName ( source ):gsub( "#%x%x%x%x%x%x", "" ) local Serial = getPlayerSerial ( source ) local master = executeSQLQuery( ' SELECT * FROM Ha WHERE Serial=? ', Serial) if ( type( master ) == "table" and #master == 0 ) or not master then iserttotable(name,Serial) end end addEventHandler ( "onPlayerJoin", root,ManagePlayrsSystem ) addEventHandler ( "onPlayerLogin", root,ManagePlayrsSystem ) function iserttotable(name,serial) executeSQLQuery("INSERT INTO Ha(name,Serial) VALUES(?,?)", name, serial) Send ( ) end function Send ( ) local SQLListe = executeSQLQuery ( "SELECT * FROM Ha " ) if #SQLListe ~= 0 then triggerClientEvent ( "ManagePlayers:SaveName", root, SQLListe ) end end addEvent ( "RefreshSystem", true ) addEventHandler ( "RefreshSystem", root, Send ) سيرفر الكلنت addEvent ( "ManagePlayers:SaveName", true ) addEventHandler ( "ManagePlayers:SaveName", root, function ( Table ) guiGridListClear( GUIEditor.gridlist[1] ) for i, _ in ipairs( Table ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1,Table[i].name, false, false) guiGridListSetItemText( GUIEditor.gridlist[1], row, 3,Table[i].Serial, false, false) end end ) addEventHandler( 'onClientResourceStart', resourceRoot, function( ) triggerServerEvent( 'RefreshSystem', localPlayer ) end ) تمام 13 minutes ago, #BrosS said: name و serial غير معرفين ومابحثت عنهم ركز شوي وش تقول انت +_+ Link to comment
Adham Posted March 10, 2017 Author Share Posted March 10, 2017 شف اخ مستر هكذا. م ظبت addEvent ( "ManagePlayers:SaveName", true ) addEventHandler ( "ManagePlayers:SaveName", root, function ( Table ) guiGridListClear( GUIEditor.gridlist[1] ) for i, _ in ipairs( Table ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1,Table[i].name, false, false) guiGridListSetItemText( GUIEditor.gridlist[1], row, 2,Table[i].det, false, false) guiGridListSetItemText( GUIEditor.gridlist[1], row, 3,Table[i].Serial, false, false) end end ) addEventHandler( 'onClientResourceStart', resourceRoot, function( ) triggerServerEvent( 'RefreshSystem', localPlayer ) end ) executeSQLQuery( "CREATE TABLE IF NOT EXISTS Ha (name,Serial,det) " ) function ManagePlayrsSystem ( ) local name = getPlayerName ( source ):gsub( "#%x%x%x%x%x%x", "" ) local Serial = getPlayerSerial ( source ) local time = getRealTime( ) local hour = time.hour % 12 and time.hour % 12 local det = ('[' .. hour .. ':' ..time.minute.. ':'.. time.second.. '] - ['.. time.monthday.. '/'.. time.month.. '/20'.. string.sub( time.year, 2 ) .. ']') local master = executeSQLQuery( ' SELECT * FROM Ha WHERE Serial=? ', Serial) if ( type( master ) == "table" and #master == 0 ) or not master then iserttotable(name,Serial,det) end end addEventHandler ( "onPlayerJoin", root,ManagePlayrsSystem ) addEventHandler ( "onPlayerLogin", root,ManagePlayrsSystem ) function iserttotable(name,serial,det) executeSQLQuery("INSERT INTO Ha(name,Serial,det) VALUES(?,?,?)", name, serial,det) Send ( ) end function Send ( ) local SQLListe = executeSQLQuery ( "SELECT * FROM Ha " ) if #SQLListe ~= 0 then triggerClientEvent ( "ManagePlayers:SaveName", root, SQLListe ) end end addEvent ( "RefreshSystem", true ) addEventHandler ( "RefreshSystem", root, Send ) يقول لي باد ارقمنت في guiGridListSetItemText( GUIEditor.gridlist[1], row, 2,Table[i].det, false, false) Link to comment
Master_MTA Posted March 10, 2017 Share Posted March 10, 2017 سوي دروب للتيبل بس لان انت منشاها من قبل ب 2 كولمن وارجع شيل الدروب Link to comment
Adham Posted March 13, 2017 Author Share Posted March 13, 2017 40 minutes ago, Master_MTA said: تمت الافاده؟ ايه . Link to comment
Master_MTA Posted March 13, 2017 Share Posted March 13, 2017 Just now, Deativated said: ايه . بالتوفيق 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