Jump to content

Team skin


dashe123

Recommended Posts

Posted (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 by Guest
Posted
  
 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

Posted

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?

Posted
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

Posted
  
local mainskin =  getPlayerSkin (  thePlayer ) 
setPedSkin (thePlayer, skinID ) 

and when you left the team then

  
setPedSkin (thePlayer, tostring(mainskin) 
  

Posted
  
local mainskin =  getPlayerSkin (  thePlayer ) 
setPedSkin (thePlayer, skinID ) 

and when you left the team then

  
setPedSkin (thePlayer, tostring(mainskin) 
  

'getPlayerSkin' is deprecated, use getElementModel instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...