Jump to content

[Help] Looking for a resource..


MissCrow

Recommended Posts

function onPlayerQuit ( ) 
      local playeraccount = getPlayerAccount ( source )    -- source instead of Acc 
      if ( playeraccount ) and not isGuestAccount ( playeraccount ) then 
            local playerskin = getElementModel ( source )    -- source instead of Acc 
            setAccountData ( playeraccount, "player.skin", playerskin ) 
      end 
end 
  
function onPlayerLogin (_, playeraccount ) 
      if ( playeraccount ) then 
            local playerskin = getAccountData ( playeraccount, "player.skin" ) 
            if ( playerskin ) then 
                  setElementModel ( source, playerskin )    -- source instead of Acc 
            end 
      end 
end 
  
addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) 
addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin ) 

 

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