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

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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

n-560x95_E60303_FFFFFF_030303_FF0303.png
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) 
  

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

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.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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...