Save player skin
#1

This problem has been found from start the server when i create the server that when i select or change the skin and die the skin changed to Cj

How could this fix?
Reply
#2

I dont understand it properly? You have a skin, and when you die you loose it and it becomes CJ or what?
Reply
#3

Exactly
Reply
#4

Save the skin into a variable, and load it each time the player spawns.

pawn Код:
new pSkin[MAX_PLAYERS];

public ChangeSkin(playerid,skin)//just an example, add the code where you have your changing things
{
pSkin[playerid] = skin;
SetPlayerSkin(playerid,skin);
}

public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid,pSkin[playerid]);
}
I highly recommend you use enums, if you don't know what these are, search. I've seen some tutorials covering this, so check those out.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)