dashe123 Posted July 22, 2011 Share Posted July 22, 2011 (edited) Greetings people! I have a question for you. How do I set a teams' skin? For example I have my main skin which I chosen using simple skin selector when I registered and when I join a police team my skin changes into a cops skin. If I leave the team my skin changes to the main skin I had before. So how do I make a script like this? Edited July 22, 2011 by Guest Link to comment
bandi94 Posted July 22, 2011 Share Posted July 22, 2011 setPedSkin (thePlayer, skinID ) police id is 280 swat id is 285 FBI id is 286 sherif id is 283 militar id is 287 Link to comment
mjau Posted July 22, 2011 Share Posted July 22, 2011 setPedSkin (thePlayer, skinID ) police id is 280 swat id is 285 FBI id is 286 sherif id is 283 militar id is 287 Ehm that is deprecated use setElementModel instead Link to comment
dashe123 Posted July 22, 2011 Author Share Posted July 22, 2011 yeah but what should I do so when I leave the team my skin changes from teams' skin to my main skin/the skin I had before joining the team? Link to comment
DarkLink Posted July 22, 2011 Share Posted July 22, 2011 yeah but what should I do so when I leave the team my skin changes from teams' skin to my main skin/the skin I had before joining the team? you get the skin before joining a team, using getElementModel and store it. setElementData(player, "skin", getElementModel(player)). Then when a player leaves a team, use getElementData(player,"skin", false) -- false so dont go up and down the tree, just the player element. And after the get use the setElementModel using the model you get . I hope you understand. Good luck Link to comment
bandi94 Posted July 22, 2011 Share Posted July 22, 2011 local mainskin = getPlayerSkin ( thePlayer ) setPedSkin (thePlayer, skinID ) and when you left the team then setPedSkin (thePlayer, tostring(mainskin) Link to comment
dashe123 Posted July 22, 2011 Author Share Posted July 22, 2011 I don't get it. For some reason I get " bad arguments @ 'getelementmodel' " in the console. Link to comment
Castillo Posted July 23, 2011 Share Posted July 23, 2011 local mainskin = getPlayerSkin ( thePlayer ) setPedSkin (thePlayer, skinID ) and when you left the team then setPedSkin (thePlayer, tostring(mainskin) 'getPlayerSkin' is deprecated, use getElementModel instead. Link to comment
dashe123 Posted July 23, 2011 Author Share Posted July 23, 2011 function given up dosnt work as it should... Link to comment
bandi94 Posted July 23, 2011 Share Posted July 23, 2011 you use server or client side ? 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