View Full Version : Skins...

12/06/2012, 04:11 PM
Hi !

Is there any function or trick to return your previous skin...

Ex. I want to make a hospital system... When you die to teleport you to the hospital and change your skin. I have timer how much you need to stay in the hospital, so you'll wear that skin while the timer is on. Can i somehow make when the timer run out, the player skin change to the previous skin that he weared ... ?

12/06/2012, 04:15 PM
Yep, you can either use a global variable or Player variables e.g. SetPVarInt(playerid, "Variable Name Here", IntegerAmount) - Set this before changing their skin.
Then after a time, you can use GetPVarInt(playerid, "Variable Name Here") to get the skin id they had beforehand

12/06/2012, 04:16 PM
yes just keep track of their skin before you change it,

new gPlayerSkin[MAX_PLAYERS];

//in the OnPlayerDeath callback use

gPlayerSkin[playerid] = GetPlayerSkin(playerid);

//then restore it when they leave the hostipal with

something like that, i wrote the code write in the browser so test it.

12/06/2012, 04:26 PM
I will edit this post

It's working rep+