Skin saving. (y_INI)
#1

------
Reply
#2

Show OnPlayerConnect and where SetTimerEx is being called.
Reply
#3

Firstly you have to save the skins when the players disconect...
pawn Код:
public OnPlayerDisconect(playerid)
{
   new sID = GetPlayerSkin(playerid); // get the players skins
   new INI:File = INI_Open(UserPath(playerid)); // the open his file in the userpatch
   INI_SetTag(File,"data");
   INI_WriteInt(File,"pSkin",sID); // we write a new line with his skins id
   INI_Close(File); // close his files
}
then add this line in your load data functions...
pawn Код:
INI_Int("pSkin",PlayerInfo[playerid][pSkin]);
then now when he spawn we set his skins...
pawn Код:
SetlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
Reply
#4

------
Reply
#5

Maybe because you are saving the skin just before the player spawns.
Try to set the timer AFTER he spawns from class selection.
Edit: If you don't get my point: The system saves the current skin (ID: 0) and stores it in the variable, in which you had stored before the saved skin.
Reply
#6

------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)