Jump to content

x[مشكلة]جلب اسم الحساب من table


Recommended Posts

السلام عليكم ورحمة الله و بركاته و بعد...

مشكلتي هي اني لما احاول اجيب اسم الحساب او السيريال من ال table

يطلعلي الخطأ التالي في الكونسل...

lua:6: Bad argument @ 'getAccountName' [Expected account at argument 1, got number '0']

الكود الي فيه الخطأ:

SSerial = { 
 ['Temperrr'] = '5C797A27C0E907998DB44774CFA6A9F3', 
 } 
  
function chatSoundColor ( _, theCurrentAccount ) 
    local Serial = SSerial[getAccountName(theCurrentAccount)] 
    if ( Serial ) then 
        if Serial ~= getPlayerSerial ( source ) then 
            return 
        end 
    end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 

Link to comment

SSerial = { 
 ['Temperrr'] = '5C797A27C0E907998DB44774CFA6A9F3', 
 } 
  
function chatSoundColor (  ) 
    local theCurrentAccount = getPlayerAccount( source ) 
    local Serial = SSerial[getAccountName(theCurrentAccount)] 
    if ( Serial ) then 
        if Serial ~= getPlayerSerial ( source ) then 
            return 
        end 
    end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 
Link to comment
SSerial = { 
 ['Temperrr'] = '5C797A27C0E907998DB44774CFA6A9F3', 
 } 
  
function chatSoundColor (  ) 
    local theCurrentAccount = getPlayerAccount( source ) 
    local Serial = SSerial[getAccountName(theCurrentAccount)] 
    if ( Serial ) then 
        if Serial ~= getPlayerSerial ( source ) then 
            return 
        end 
    end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 

اشتغل اخوي لاكن الحين الي صار

يوم اخش بحساب Temperrr

ما القا فيه الخصائص و الزائر او اي حساب ثاني عنده الخصائص الكود حقي كذا..

    SSerial = { 
     ['Temperrr'] = '6C797A27C0E907998DB44774CFA6A9F3', 
     } 
      
    function chatSoundColor (  ) 
        local theCurrentAccount = getPlayerAccount( source ) 
        local Serial = SSerial[getAccountName(theCurrentAccount)] 
        if ( Serial ) then 
            if Serial ~= getPlayerSerial ( source ) then 
                return 
            end 
            else 
            triggerClientEvent ( getRootElement(), "onPlaysounds", resourceRoot ) 
            cancelEvent() 
            local chatterName = getPlayerName ( source ) 
            outputChatBox ("#ff0000[#ffffffV#000000.#ffffffI#000000.#FFFFFFP#FF0000]"..chatterName, getRootElement(), r, g, b, true ) 
        end 
    end 
    addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 

Link to comment
SSerial = { 
    ['Temperrr'] = '6C797A27C0E907998DB44774CFA6A9F3', 
} 
      
function chatSoundColor ( msg ) 
    local theCurrentAccount = getPlayerAccount( source ) 
    local Serial = SSerial[getAccountName(theCurrentAccount)] 
    if ( Serial ) then 
        if Serial == getPlayerSerial ( source ) then 
            triggerClientEvent ( getRootElement(), "onPlaysounds", resourceRoot ) 
            cancelEvent() 
            local chatterName = getPlayerName ( source ) 
            outputChatBox ("#ff0000[#ffffffV#000000.#ffffffI#000000.#FFFFFFP#FF0000]"..chatterName, getRootElement(), r, g, b, true ) 
        end 
    end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 

Link to comment
SSerial = { 
    ['Temperrr'] = '6C797A27C0E907998DB44774CFA6A9F3', 
} 
      
function chatSoundColor ( msg ) 
    local theCurrentAccount = getPlayerAccount( source ) 
    local Serial = SSerial[getAccountName(theCurrentAccount)] 
    if ( Serial ) then 
        if Serial == getPlayerSerial ( source ) then 
            triggerClientEvent ( getRootElement(), "onPlaysounds", resourceRoot ) 
            cancelEvent() 
            local chatterName = getPlayerName ( source ) 
            outputChatBox ("#ff0000[#ffffffV#000000.#ffffffI#000000.#FFFFFFP#FF0000]"..chatterName, getRootElement(), r, g, b, true ) 
        end 
    end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 

تسلموا ما تقصرون

Link to comment
SSerial = { 
    ['Temperrr'] = '6C797A27C0E907998DB44774CFA6A9F3', 
} 
      
function chatSoundColor ( msg ) 
    local theCurrentAccount = getPlayerAccount( source ) 
    local Serial = SSerial[getAccountName(theCurrentAccount)] 
    if ( Serial ) then 
        if Serial == getPlayerSerial ( source ) then 
            triggerClientEvent ( getRootElement(), "onPlaysounds", resourceRoot ) 
            cancelEvent() 
            local chatterName = getPlayerName ( source ) 
            outputChatBox ("#ff0000[#ffffffV#000000.#ffffffI#000000.#FFFFFFP#FF0000]"..chatterName, getRootElement(), r, g, b, true ) 
        end 
    end 
end 
addEventHandler("onPlayerChat", getRootElement(), chatSoundColor) 

تسلموا ما تقصرون

أرحب :]

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