Mr.Hugin Posted December 18, 2020 Share Posted December 18, 2020 (edited) السلام عليكم عندي مشكلة في داته في كود لمن اسويه يحفظ الكلام يعني يحفض لمن الاعب يسجل خروج ولمن يسجل دخول كمان يحفظ بس لمن اسوي ريستارت للمود كل شي يروح وهاذا الكود addEvent("saveMfkrhText",true) addEventHandler("onResourceStart",resourceRoot, function() executeSQLQuery ('CREATE TABLE IF NOT EXISTS `SAVETEXT` (acc,text) ') end ) addEventHandler("saveMfkrhText",root, function(acc,text) if not isGuestAccount(getPlayerAccount(player)) then local Results = executeSQLQuery("SELECT * FROM `SAVETEXT` WHERE acc=?",acc) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO `SAVETEXT` (acc,text) VALUES(?,?)",acc,text) else executeSQLQuery('UPDATE `SAVETEXT` SET text =? WHERE acc=?',text,acc) end end end ) addEventHandler("onPlayerLogin",root, function(_,acc) local Results = executeSQLQuery("SELECT * FROM `SAVETEXT` WHERE acc=?",acc) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then return end triggerClientEvent(source,"setMfkrhText",source,Results[1]['text']) end ) انا بدي لمن اسوي رستارت للمود كل شي ينحفظ < وشكرأ> Edited December 18, 2020 by [T][O][P]CoCo Link to comment
Mr.Hugin Posted December 19, 2020 Author Share Posted December 19, 2020 خلاص لقيت الحل شكرأ انقفل الموضوع 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