dashe123 Posted July 22, 2011 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
bandi94 Posted July 22, 2011 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
mjau Posted July 22, 2011 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
dashe123 Posted July 22, 2011 Author 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?
DarkLink Posted July 22, 2011 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
bandi94 Posted July 22, 2011 Posted July 22, 2011 local mainskin = getPlayerSkin ( thePlayer ) setPedSkin (thePlayer, skinID ) and when you left the team then setPedSkin (thePlayer, tostring(mainskin)
dashe123 Posted July 22, 2011 Author Posted July 22, 2011 I don't get it. For some reason I get " bad arguments @ 'getelementmodel' " in the console.
Castillo Posted July 23, 2011 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.
dashe123 Posted July 23, 2011 Author Posted July 23, 2011 function given up dosnt work as it should...
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