محمود Posted June 28, 2019 Share Posted June 28, 2019 (edited) السلام عليكم انا جديد هنا و جبت المود دا من عن طريق النت بس بتواجهني مشكله فيه انو لما الاعب بيقفل و يفتح البس مش بيتسجل علي شخصيه سي جي ممكن حد يساعدني 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 June 29, 2019 by N3xT Link to comment
Jw8. Posted June 29, 2019 Share Posted June 29, 2019 جرب 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
محمود Posted June 29, 2019 Author Share Posted June 29, 2019 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now