Jump to content

[حل مشكلة عندي مشكلة بداته بيس يلي يعرف يدخل [مساعدة


Mr.Hugin

Recommended Posts

السلام عليكم 

عندي مشكلة في داته

في كود لمن اسويه يحفظ الكلام 

يعني يحفض لمن الاعب يسجل خروج

ولمن يسجل دخول كمان يحفظ

بس لمن اسوي ريستارت للمود

كل شي يروح

وهاذا الكود

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 by [T][O][P]CoCo
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...