Jump to content

OnPlayerQuit


PashaBiceps

Recommended Posts

I would like to return it to the old skin when the player leaves the game, but it is not working.

addEventHandler("onPlayerQuit",getRootElement(),function()
	local outskin = tonumber(getElementData(source, "skinout"))
	setElementModel(source, outskin)
end)

It's working good in-game! 

 

 

 

Link to comment
2 hours ago, SpecT said:

What is the point of setting a skin to a player when he leaves the server?

 

The point is.. I have an inventory that u press the item and the player wear a skin, if you press it again the item will give the old skin back to the player with a 10 seconds block to avoid bugs. But if the player leaves the game with the skin from the item that the player used before and the server don't give the old skin back when the player leaves, the old skin will dissapear forever. 

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