αвυ-wαleed Posted July 4, 2015 Share Posted July 4, 2015 يا اخوان ايش الخطأ عندي ما اضبط معي الكود function asd ( ) local abu = getPlayerAccount ( source ) if ( abu ) and not isGuestAccount ( abu ) then local playerTeam = getPlayerTeam ( source ) setAccountData ( abu, "piraterpg.Team", playerTeam ) end end addEventHandler ( "onPlayerQuit", getRootElement ( ), asd ) function aasd (_, abu ) if ( abu ) then local playerTeam = getAccountData ( abu, "piraterpg.Team" ) if ( playerTeam ) then setPlayerTeam ( source, PlayerTeam ) end end end addEventHandler ( "onPlayerLogin", getRootElement ( ), aasd ) Link to comment
TAPL Posted July 4, 2015 Share Posted July 4, 2015 ما تقدر تحفظ المنت التيم لازم تجيب اسم التيم و تحفظه و بعدها تجيب المنت التيم من الأسم الي حفظته getTeamName -- getTeamFromName Link to comment
αвυ-wαleed Posted July 4, 2015 Author Share Posted July 4, 2015 تم للفائدة الكود شغال 100% وشكرا اخ تابل عل المساعدة function asd ( ) local abu = getPlayerAccount ( source ) if ( abu ) and not isGuestAccount ( abu ) then local playerTeam = getPlayerTeam ( source ) setAccountData ( abu, "piraterpg.Team", getTeamName ( playerTeam ) ) end end function aasd (_, abu ) if ( abu ) then local playerTeam = getAccountData ( abu, "piraterpg.Team" ) if ( playerTeam ) then setPlayerTeam ( source, getTeamFromName ( playerTeam ) ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), asd ) addEventHandler ( "onPlayerLogin", getRootElement ( ), aasd ) 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