Kaio Bruno Silveira Posted November 12, 2020 Share Posted November 12, 2020 quando o cara morre ele nao ta nascendo com a skin que ele tava antes,Alguem Sabe resolver?? Link to comment
Moderators Patrick Posted November 12, 2020 Moderators Share Posted November 12, 2020 Wrong language, moved to Portuguese section. Link to comment
Blaack Posted November 12, 2020 Share Posted November 12, 2020 4 hours ago, Kaio Bruno Silveira said: quando o cara morre ele nao ta nascendo com a skin que ele tava antes,Alguem Sabe resolver?? ultimaSkin = {} function morrerUltimaSkin() local skin = getElementModel(source) ultimaSkin[source] = skin local lastSkin = ultimaSkin[source] if ultimaSkin[source] then setTimer(setElementModel, 3000, 1, source, lastSkin) ultimaSkin[source] = nil end end addEventHandler ( "onPlayerWasted", root, morrerUltimaSkin ) Tente user este codigo (server.lua) Link to comment
Boechat Posted November 13, 2020 Share Posted November 13, 2020 (edited) Veja se funciona assim: --server-side function Wasted() setElementData(source, 'Skin', getElementModel(source)) end addEventHandler ( "onPlayerWasted", root, Wasted ) function Spawn() local skin = getElementData(source, 'Skin') or 0 setElementModel(source, skin) end addEventHandler("onPlayerSpawn", root, Spawn) -- This will exec every time a Player spawn Edited November 13, 2020 by Boechat 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