Jump to content

Saving problem in my server


Recommended Posts

function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin)		 
	if  not (isGuestAccount (getPlayerAccount (source))) then	 
	local accountSkinData = getAccountData (theCurrentAccount, "skinid")
	spawnPlayer (source, 0, 0, 1, 0, playerSkin, 0, 0)
	end
end
addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)
	
	
	
function onQuit (quitType, reason, responsibleElement)
if not (isGuestAccount (getPlayerAccount (source))) then
    account = getPlayerAccount (source)
    if (account) then
	setAccountData (account, "skinid", tostring (getPedSkin (source)))
	end
end
end
addEventHandler ("onPlayerQuit", getRootElement(), onQuit)

 

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