PashaBiceps Posted March 10, 2019 Share Posted March 10, 2019 Hi guys, im doing a job and is almost done, just need one more thing. When some player starts the job, The skin of the job is set to him with this code. setElementData(player, "astronaut:Skin", setPedSkin (player, 264)); Until now, everything works. My problem is when the player leaves the job and the skin is not set to skin that the player was before, continues with the skin of the job. Even with this code. removeElementData(player,"astronaut:Skin"); Thanks in advance for any help. So far, everthing works. My problem is when the player leaves the job the skin is not set to what the player was before but rather continues with the skin of the jobSo far, everything works. My problem is when the player leaves the job the skin is not set to what the player was before but rather continues with the skin of the job. 1 Link to comment
Moderators Patrick Posted March 10, 2019 Moderators Share Posted March 10, 2019 You save a bool value to elementdata and not the old skin id. -- enter to job setElementData(player, "astronaut:Skin", getElementModel(player)) -- save old setElementModel(player, 264) -- leave job setElementModel(player, getElementData(player, "astronaut:Skin")) -- load back removeElementData(player, "astronaut:Skin") 1 Link to comment
PashaBiceps Posted March 10, 2019 Author Share Posted March 10, 2019 1 hour ago, stPatrick said: You save a bool value to elementdata and not the old skin id. -- enter to job setElementData(player, "astronaut:Skin", getElementModel(player)) -- save old setElementModel(player, 264) -- leave job setElementModel(player, getElementData(player, "astronaut:Skin")) -- load back removeElementData(player, "astronaut:Skin") Thanks a lot bro. 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