MA[S]RIY

[ مشكله ]xبكود

37 posts in this topic

ايه نسيها صح , بس ايكو عطاه الكود فوق

1 person likes this

Share this post


Link to post

هذا موضوعنا ,
ويقول انه م في خطأ وم في فاصلة منسية ,
صلي ساعة افهمه !
@Deativated

Share this post


Link to post

يب ناسي فصله بعد الحدث

1 person likes this

Share this post


Link to post

م شفتها افكرك تقول عن ال space !

Share this post


Link to post

صلي ساعتين اقولك ناسي فاصلة وتقلي لازم انت بـ مستشفى المجانين ,
-_-"
@#_iMr.[E]coo

Share this post


Link to post

يا جماعه استهدو بالا

ش حصل علشان ذا كلهو

شكرا للكل 

Share this post


Link to post
On ٢١‏/٤‏/٢٠١٧ at 00:21, #_iMr.[E]coo said:

addEventHandler ( "onPlayerLogout" , root ,
  function ( )
    setAccountData ( getPlayerAccount ( source ) , "aSaveMoney" , tonumber ( getPlayerMoney ( source ) ) )
  end
)

addEventHandler ( "onPlayerQuit" , root ,
  function ( )
    setAccountData ( getPlayerAccount ( source ) , "aSaveMoney" , tonumber ( getPlayerMoney ( source ) ) ) 
  end
)

addEventHandler ( "onPlayerLogin" , root ,
  function ( )
    givePlayerMoney ( source , tonumber ( getAccountData ( getPlayerAccount ( source ) , "aSaveMoney" ) ) )
  end
)

 

إحتمال كبير كودك خطأ ، احيانا راح يشتغل واحيانا لا

راجع الويكي، حدث تسجيل الخروج

Share this post


Link to post
10 minutes ago, N3xT said:

إحتمال كبير كودك خطأ ، احيانا راح يشتغل واحيانا لا

راجع الويكي، حدث تسجيل الخروج

ما شفت شي بالويكي

Share this post


Link to post
function Save()
    local Acc = getPlayerAccount(source)
    if ( Acc  ) then
        local bMoney = getPlayerMoney(source)
        setAccountData(Acc, "MoneySave", playerCash)
        setPlayerMoney(source, 0)
    end
end
addEventHandler("onPlayerQuit", getRootElement(), Save)
addEventHandler("onPlayerLogout", getRootElement(), Save)
 
function Recover()
    local Acc = getPlayerAccount(source)
    if (Acc) then
        local SaveData = getAccountData(Acc, "MoneySave")
        if (SaveData) then
            setPlayerMoney(source, tonumber(SaveData))
		end	
    end
end
addEventHandler("onPlayerLogin", getRootElement(), Recover)              

 

Share this post


Link to post
21 minutes ago, 3laa33 said:

@#BrosS
راجع سطر رقم 5

:D

function Save()
    local Acc = getPlayerAccount(source)
    if ( Acc  ) then
        local bMoney = getPlayerMoney(source)
        setAccountData(Acc, "MoneySave", bMoney)
        setPlayerMoney(source, 0)
    end
end
addEventHandler("onPlayerQuit", getRootElement(), Save)
addEventHandler("onPlayerLogout", getRootElement(), Save)
 
function Recover()
    local Acc = getPlayerAccount(source)
    if (Acc) then
        local SaveData = getAccountData(Acc, "MoneySave")
        if (SaveData) then
            setPlayerMoney(source, tonumber(SaveData))
		end	
    end
end
addEventHandler("onPlayerLogin", getRootElement(), Recover) 

 

2 people like this

Share this post


Link to post

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.