Jump to content

جديد مساعده


Recommended Posts

السلام عليكم انا جديد هنا و جبت المود دا من عن طريق النت بس بتواجهني مشكله فيه انو لما الاعب بيقفل و يفتح البس مش بيتسجل علي شخصيه سي جي ممكن حد يساعدني

addEvent( "onChangeClothesCJ", true )
addEventHandler( "onChangeClothesCJ", root,
function ( CJClothesTable, CJClothesString )
    if ( CJClothesTable ) then
        for int, index in pairs( CJClothesTable ) do
            local texture, model = getClothesByTypeIndex ( int, index )
            if ( texture ) then
                addPedClothes ( source, texture, model, int )
        if (int == 0) then    
            exports.:SAD(getPlayerAccount(source), "cjclothesShirtType", int)
            exports.:SAD(getPlayerAccount(source), "cjclothesShirtIndex", index)
        end    
            end
        end
        outputDebugString(CJClothesString)
        exports.:SAD(getPlayerAccount(source), "cjclothes", CJClothesString)
    end
end
)

addEvent( "onPlayerBougtSkin", true )
addEventHandler( "onPlayerBougtSkin", root,
function ( thePrice ) 
    if ( thePrice ) then
        takePlayerMoney( source, tonumber(thePrice), "CJ Clothes" )
    end
end
)

function setClothesOnLogin(_, acc)
    local skin = exports.:GAD(acc, "skin")
    if (skin == 0) then
        local CJCLOTTable = fromJSON( tostring( exports.:GAD(acc, "cjclothes" ) ) )
        if CJCLOTTable then
            for theType, index in pairs( CJCLOTTable ) do
                local texture, model = getClothesByTypeIndex ( theType, index )
        if ( texture and model ) then
                    addPedClothes ( source, texture, model, theType )
        end
            end
        end
    local shirt = exports.:GAD(acc, "cjclothesShirtType")
    if (shirt and shirt == 0) then    
        local shirtIndex = exports.:GAD(acc, "cjclothesShirtIndex")
        local text, mod = getClothesByTypeIndex ( shirt, shirtIndex )
        if ( text and mod) then
            addPedClothes ( source, text, mod, shirt )
        end
    end    
    end
end
addEventHandler("onPlayerLogin", root, setClothesOnLogin)

 

Edited by N3xT
Link to comment

جرب

 

addEvent( "onChangeClothesCJ", true )
addEventHandler( "onChangeClothesCJ", root,
function ( CJClothesTable, CJClothesString )
    if ( CJClothesTable ) then
        for int, index in pairs( CJClothesTable ) do
            local texture, model = getClothesByTypeIndex ( int, index )
            if ( texture ) then
                addPedClothes ( source, texture, model, int )
        if (int == 0) then    
            setAccountData(getPlayerAccount(source), "cjclothesShirtType", int)
            setAccountData(getPlayerAccount(source), "cjclothesShirtIndex", index)
        end    
            end
        end
        outputDebugString(CJClothesString)
        setAccountData(getPlayerAccount(source), "cjclothes", CJClothesString)
    end
end
)

addEvent( "onPlayerBougtSkin", true )
addEventHandler( "onPlayerBougtSkin", root,
function ( thePrice ) 
    if ( thePrice ) then
        takePlayerMoney( source, tonumber(thePrice), "CJ Clothes" )
    end
end
)

function setClothesOnLogin(_, acc)
    local skin = getAccountData(acc, "skin")
    if (skin == 0) then
        local CJCLOTTable = tostring( getAccountData(acc, "cjclothes" ) )
        if CJCLOTTable then
            for theType, index in pairs( CJCLOTTable ) do
                local texture, model = getClothesByTypeIndex ( theType, index )
        if ( texture and model ) then
                    addPedClothes ( source, texture, model, theType )
        end
            end
        end
    local shirt = getAccountData(acc, "cjclothesShirtType")
    if (shirt and shirt == 0) then    
        local shirtIndex = getAccountData(acc, "cjclothesShirtIndex")
        local text, mod = getClothesByTypeIndex ( shirt, shirtIndex )
        if ( text and mod) then
            addPedClothes ( source, text, mod, shirt )
        end
    end    
    end
end
addEventHandler("onPlayerLogin", root, setClothesOnLogin)

 

Link to comment
15 minutes ago, DmAr511 said:

جرب

 


addEvent( "onChangeClothesCJ", true )
addEventHandler( "onChangeClothesCJ", root,
function ( CJClothesTable, CJClothesString )
    if ( CJClothesTable ) then
        for int, index in pairs( CJClothesTable ) do
            local texture, model = getClothesByTypeIndex ( int, index )
            if ( texture ) then
                addPedClothes ( source, texture, model, int )
        if (int == 0) then    
            setAccountData(getPlayerAccount(source), "cjclothesShirtType", int)
            setAccountData(getPlayerAccount(source), "cjclothesShirtIndex", index)
        end    
            end
        end
        outputDebugString(CJClothesString)
        setAccountData(getPlayerAccount(source), "cjclothes", CJClothesString)
    end
end
)

addEvent( "onPlayerBougtSkin", true )
addEventHandler( "onPlayerBougtSkin", root,
function ( thePrice ) 
    if ( thePrice ) then
        takePlayerMoney( source, tonumber(thePrice), "CJ Clothes" )
    end
end
)

function setClothesOnLogin(_, acc)
    local skin = getAccountData(acc, "skin")
    if (skin == 0) then
        local CJCLOTTable = tostring( getAccountData(acc, "cjclothes" ) )
        if CJCLOTTable then
            for theType, index in pairs( CJCLOTTable ) do
                local texture, model = getClothesByTypeIndex ( theType, index )
        if ( texture and model ) then
                    addPedClothes ( source, texture, model, theType )
        end
            end
        end
    local shirt = getAccountData(acc, "cjclothesShirtType")
    if (shirt and shirt == 0) then    
        local shirtIndex = getAccountData(acc, "cjclothesShirtIndex")
        local text, mod = getClothesByTypeIndex ( shirt, shirtIndex )
        if ( text and mod) then
            addPedClothes ( source, text, mod, shirt )
        end
    end    
    end
end
addEventHandler("onPlayerLogin", root, setClothesOnLogin)

 

مش بيسجل الشخصيه للائسف

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