Skins...
#1

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 ... ?
Reply
#2

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
Reply
#3

yes just keep track of their skin before you change it,


pawn Код:
new gPlayerSkin[MAX_PLAYERS];

//in the OnPlayerDeath callback use


gPlayerSkin[playerid] = GetPlayerSkin(playerid);


//then restore it when they leave the hostipal with
SetPlayerSkin(playerid,gPlayerSkin[playerid]);

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

Testing...
I will edit this post

It's working rep+
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)