Jump to content

بنسبة للحفظ ~!


MuhannaDx

Recommended Posts

شباب اول مود حفظ لي وفيه خطا

سيرفر +

function Quit () 
local Money = getPlayerMoney ( source ) 
local Acc = getAccountPlayer ( source ) 
    if isGuestAccount ( Acc ) then 
    else 
    setAccountData ( source, "MoneyPlayer", Money ) 
    end 
end 
addEventHandler ( "onPlayerQuit", root, Quit ) 
  
function Join ( _, acc ) 
local Moneys = getAccountData ( acc, Money ) 
    if ( Moneys ) then 
    setPlayerMoney ( source, Moneys )    
    end 
end 
addEventHandler ( "onPlayerJoin", root, Join ) 

اتمنى تقولولي وش الخطا

Link to comment

تعديل :

function Quit () 
local Money = getPlayerMoney ( source ) 
local Acc = getAccountPlayer ( source ) 
    if isGuestAccount ( Acc ) then 
    else 
    setAccountData ( source, "MoneyPlayer", Money ) 
    end 
end 
addEventHandler ( "onPlayerQuit", root, Quit ) 
  
function Join ( _, acc ) 
local Moneys = getAccountData ( acc, "MoneyPlayer" ) 
    if ( Moneys ) then 
    setPlayerMoney ( source, Moneys )    
    end 
end 
addEventHandler ( "onPlayerJoin", root, Join ) 

وبرضو فيه خطا

Link to comment

function Quit () 
local acc = getPlayerAccount ( source ) 
local mon = getPlayerMoney ( source ) 
    if ( mon > 0 ) then 
        if not ( isGuestAccount ( acc ) ) then 
            setAccountData ( acc, "MoneyPlayer", mon ) 
        end 
    end 
end 
  
addEventHandler ( "onPlayerQuit", root, Quit ) 
  
function Join ( _, acc ) 
if ( acc ) 
    local mon = getAccountData ( acc, "MoneyPlayer" ) 
        if ( mon ) then 
            setPlayerMoney ( source, mon )    
        end 
    end 
end 
  
addEventHandler ( "onPlayerJoin", root, Join ) 
Link to comment

خطا عليكم كلكم

-ـ-

كيف حاطين acc ?

من وين جايبينها

onPlayerJoin مالها باريتماتس او الي هو :)

+ روك ناسي then

+ onPlayerJoin ماراح يكون للاعب حساب بالتاكيد راح يكون guset -_-

يعني يكون كذا :)

function Quit () 
local acc = getPlayerAccount ( source ) 
local mon = getPlayerMoney ( source ) 
    if ( mon > 0 ) then 
        if not ( isGuestAccount ( acc ) ) then 
            setAccountData ( acc, "MoneyPlayer", mon ) 
        end 
    end 
end 
  
addEventHandler ( "onPlayerQuit", root, Quit ) 
  
function Join (ـ،ـ،acc) 
if ( acc ) then 
    local mon = getAccountData ( acc, "MoneyPlayer" ) 
        if ( mon ) then 
            setPlayerMoney ( source, mon )   
        end 
    end 
end 
  
addEventHandler ( "onPlayerLogin", root, Join ) 

Link to comment

خلاص عرفت الاخطاء رجعت ل شرح ذا بيست

الاخطاء :

  
    setAccountData ( source, "SaveMoney", Money ) > هنا محطي سورس المفروض الاكاونت الي احط فيه الداتا 
addEventHandler ( "onPlayerJoin", root, Join ) > بلغلط حقت عند الدخول المفروض عند تسجيل الدخول 
  

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...