+Source|> Posted June 22, 2018 Share Posted June 22, 2018 انا مسوي ليبل ومسوي لو كتبت كلام في الإيديت بوكس يجي في الليبل ومسوي الكلام ينحفظ بالسكل بس المشكله انو الكلام يظهر للكل ابيه يضهر للشخص اللي كتب الكلام بس --server addEvent("addM", true) addEventHandler("addM", root, function( Medit ) local MSG = Medit executeSQLQuery( "INSERT INTO MSGSYS ( MSG ) VALUES( ? )", MSG ) triggerEvent ( 'Refresh' , source ) end ) addEvent ( 'Refresh' , true ) addEventHandler ( 'Refresh' , root , function () local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS' ) if ( #aSQL2c ~= 0 ) then triggerClientEvent ( source, 'AddMsg' , source , aSQL2c ) end end ) --client addEvent ( 'AddMsg' , true ) addEventHandler ( 'AddMsg' , root , function( Table ) for i, v in ipairs( Table ) do guiSetText( LblMN, v.MSG ) end end ) Link to comment
N3xT Posted June 22, 2018 Share Posted June 22, 2018 استبدل السيرفر كذا وشوف addEvent("addM", true) addEventHandler("addM", root, function( Medit ) local MSG = Medit if ( MSG ) then local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS WHERE playerSerial=?', getPlayerSerial ( source ) ) if ( #aSQL2c == 0 ) then executeSQLQuery( "INSERT INTO MSGSYS ( MSG ) VALUES( ? )", MSG ) else executeSQLQuery("UPDATE MSGSYS SET MSG=? WHERE playerSerial=?", MSG, getPlayerSerial ( source ) ) end triggerEvent ( 'Refresh' , source ) end end ) addEvent ( 'Refresh' , true ) addEventHandler ( 'Refresh' , root , function () local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS WHERE playerSerial=?', getPlayerSerial ( source ) ) if ( #aSQL2c ~= 0 ) then triggerClientEvent ( source, 'AddMsg' , source , aSQL2c ) end end ) 1 Link to comment
+Source|> Posted June 22, 2018 Author Share Posted June 22, 2018 13 hours ago, N3xT said: استبدل السيرفر كذا وشوف addEvent("addM", true) addEventHandler("addM", root, function( Medit ) local MSG = Medit if ( MSG ) then local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS WHERE playerSerial=?', getPlayerSerial ( source ) ) if ( #aSQL2c == 0 ) then executeSQLQuery( "INSERT INTO MSGSYS ( MSG ) VALUES( ? )", MSG ) else executeSQLQuery("UPDATE MSGSYS SET MSG=? WHERE playerSerial=?", MSG, getPlayerSerial ( source ) ) end triggerEvent ( 'Refresh' , source ) end end ) addEvent ( 'Refresh' , true ) addEventHandler ( 'Refresh' , root , function () local aSQL2c = executeSQLQuery ( 'SELECT * FROM MSGSYS WHERE playerSerial=?', getPlayerSerial ( source ) ) if ( #aSQL2c ~= 0 ) then triggerClientEvent ( source, 'AddMsg' , source , aSQL2c ) end end ) شكراً 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