Mr.Mostafa Posted July 7, 2018 Share Posted July 7, 2018 (edited) سلام عليكم احاول اسوي لو الشخص خرج ودخل فلوسه ما تروح وترججع زي ماهي طبعا في اكتر من مود موجودين لكن حبيت اسويها بنفسي عشان اتدرب علي القاعدة وطبعا القاعدة اكوادها خطا في ابي تصحيح , وشكرا لكم : executeSQLQuery("CREATE TABLE IF NOT EXISTS saveMoney ( playerMoney TEXT, serialPlayer TEXT )") addEventHandler ( "onPlayerQuit" , root , function ( ) local Money = getPlayerMoney ( source ) if ( Money > 0 ) then executeSQLQuery("INSERT INTO saveMoney ( playerMoney, serialPlayer ) VALUES( ?, ? )", getPlayerMoney(source), getPlayerSerial( source ) ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) local MoneyData = executeSQLQuery( 'SELECT playerMoney FROM saveMoney WHERE playerMoney = ? AND serialPlayer = ?', getPlayerMoney(source), getPlayerSerial( source ) ) if ( MoneyData ) then setPlayerMoney ( source , MoneyData ) end end ) Edited July 7, 2018 by Mr.Mostafa 1 Link to comment
Master_MTA Posted July 7, 2018 Share Posted July 7, 2018 (edited) 2 hours ago, Mr.Mostafa said: سلام عليكم احاول اسوي لو الشخص خرج ودخل فلوسه ما تروح وترججع زي ماهي طبعا في اكتر من مود موجودين لكن حبيت اسويها بنفسي عشان اتدرب علي القاعدة وطبعا القاعدة اكوادها خطا في ابي تصحيح , وشكرا لكم : executeSQLQuery("CREATE TABLE IF NOT EXISTS saveMoney ( playerMoney TEXT, serialPlayer TEXT )") addEventHandler ( "onPlayerQuit" , root , function ( ) local Money = getPlayerMoney ( source ) if ( Money > 0 ) then executeSQLQuery("INSERT INTO saveMoney ( playerMoney, serialPlayer ) VALUES( ?, ? )", getPlayerMoney(source), getPlayerSerial( source ) ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) local MoneyData = executeSQLQuery( 'SELECT playerMoney FROM saveMoney WHERE playerMoney = ? AND serialPlayer = ?', getPlayerMoney(source), getPlayerSerial( source ) ) if ( MoneyData ) then setPlayerMoney ( source , MoneyData ) end end ) صراحة انا مره معجب بالتطور اللي وصلتله اشوفلك مستقبل ممتاز تفضل executeSQLQuery("CREATE TABLE IF NOT EXISTS saveMoney ( playerMoney TEXT, serialPlayer TEXT )") addEventHandler ( "onPlayerQuit" , root , function ( ) local Money = getPlayerMoney ( source ) executeSQLQuery("INSERT INTO saveMoney ( playerMoney, serialPlayer ) VALUES( ?, ? )", getPlayerMoney(source), getPlayerSerial( source ) ) end ) addEventHandler ( "onPlayerJoin" , root , function ( ) local sel= executeSQLQuery( 'SELECT * FROM saveMoney WHERE serialPlayer = ?', getPlayerSerial( source ) ) if ( #sel~=0 ) then setPlayerMoney ( source , sel[0]['playerMoney'] ) end end ) وسامحني لو في شي غلط لان لي فتره كبيره ما برمجت Edited July 7, 2018 by Master_MTA Link to comment
Abdul KariM Posted July 7, 2018 Share Posted July 7, 2018 4 minutes ago, Master_MTA said: صراحة انا مره معجب بالتطور اللي وصلتله اشوفلك مستقبل ممتاز تفضل executeSQLQuery("CREATE TABLE IF NOT EXISTS saveMoney ( playerMoney TEXT, serialPlayer TEXT )") addEventHandler ( "onPlayerQuit" , root , function ( ) local Money = getPlayerMoney ( source ) executeSQLQuery("INSERT INTO saveMoney ( playerMoney, serialPlayer ) VALUES( ?, ? )", getPlayerMoney(source), getPlayerSerial( source ) ) end ) addEventHandler ( "onPlayerJoin" , root , function ( ) local sel= executeSQLQuery( 'SELECT * FROM saveMoney WHERE serialPlayer = ?', getPlayerSerial( source ) ) if ( #sel~=0 ) then setPlayerMoney ( source , sel[0]['playerMoney'] ) end end ) وسامحني لو في شي غلط لان لي فتره كبيره ما برمجت [1] وتحتاج ي صاحب الموضوع تسوي ابديت للقاعدة لو كان الاعب مخزن فلوس من قبل وتغيرت فلوسه لازم تسوي ابديت 1 Link to comment
Master_MTA Posted July 7, 2018 Share Posted July 7, 2018 19 minutes ago, Abdul KariM said: [1] يب تسلم متعود على php لصاحب الموضوع غير setPlayerMoney ( source , sel[0]['playerMoney'] ) الى setPlayerMoney ( source , sel[1]['playerMoney'] ) Link to comment
Mr.Mostafa Posted July 7, 2018 Author Share Posted July 7, 2018 4 hours ago, Master_MTA said: صراحة انا مره معجب بالتطور اللي وصلتله اشوفلك مستقبل ممتاز تفضل تعليقك حمسني والله , تسلم <3 4 hours ago, Master_MTA said: executeSQLQuery("CREATE TABLE IF NOT EXISTS saveMoney ( playerMoney TEXT, serialPlayer TEXT )") addEventHandler ( "onPlayerQuit" , root , function ( ) local Money = getPlayerMoney ( source ) executeSQLQuery("INSERT INTO saveMoney ( playerMoney, serialPlayer ) VALUES( ?, ? )", getPlayerMoney(source), getPlayerSerial( source ) ) end ) addEventHandler ( "onPlayerJoin" , root , function ( ) local sel= executeSQLQuery( 'SELECT * FROM saveMoney WHERE serialPlayer = ?', getPlayerSerial( source ) ) if ( #sel~=0 ) then setPlayerMoney ( source , sel[0]['playerMoney'] ) end end ) ما قصرت تسلم 4 hours ago, Master_MTA said: وسامحني لو في شي غلط لان لي فتره كبيره ما برمجت الكل يغلط عادي ;d 4 hours ago, Abdul KariM said: [1] وتحتاج ي صاحب الموضوع تسوي ابديت للقاعدة لو كان الاعب مخزن فلوس من قبل وتغيرت فلوسه لازم تسوي ابديت ما قصرت تسلم 1 Link to comment
Master_MTA Posted July 8, 2018 Share Posted July 8, 2018 2 hours ago, Mr.Mostafa 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