Jump to content

طلب مساعده


Recommended Posts

يا اخوان ايش الخطأ عندي ما اضبط معي الكود

 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

ما تقدر تحفظ المنت التيم

لازم تجيب اسم التيم و تحفظه

و بعدها تجيب المنت التيم من الأسم الي حفظته

getTeamName 
-- 
getTeamFromName 

Link to comment

تم للفائدة الكود شغال 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

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