Sumexr Posted January 21, 2020 Share Posted January 21, 2020 Alguem pode me ajudar como fazer um script pra morrer ou deslogar do servidor sem perder skin ou trocar Link to comment
Angelo Pereira Posted January 22, 2020 Share Posted January 22, 2020 (edited) root = getRootElement() tempo = 2000 -- 2s p/ carregar a skin apos morrer/Logar ! --/> MORRER function salvar_skin () local skin = getPedSkin(source) setTimer (setElementModel, tempo, 1, source, skin, true) end addEventHandler ( "onPlayerWasted", root, salvar_skin ) --/> QUIT / Salvar no Element "skin_salva" function quit_salvar_skin () local conta = getPlayerAccount(source) setAccountData (conta, "skin_salva", tostring (getPedSkin(source))) end addEventHandler ( "onPlayerQuit", root, quit_salvar_skin ) --/> LOGIN / Carregará function playerLogin (_, account) local conta_date = getAccountData (account, "skin_salva") if conta_date then setTimer (setElementModel, tempo, 1, source, conta_date, true) end end addEventHandler ("onPlayerLogin", root, playerLogin) É apenas um exemplo, se está funcional eu não sei Edited January 22, 2020 by Lord Henry 1 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