The command "/setskin" really isn't made to be permanent, it was made to be temporary.
But if you want to make then permanent, you need to use enums i guess(Like the Register/Login system, if you have it)
I'm just guessing this, so don't really expect it to work xd
pawn Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pScore,
pKills,
pDeaths,
pSkin
}
//OnPlayerDisconnect
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
//Your other stuff here
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_Close(File);
return 1;
}
//OnDialogResponse, at your case dialog_login
//your other stuff here
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
//closing brackets here, or other script parts here..
//At your setskin command
PlayerInfo[playerid][pSkin] = skinid;//Sets the playerid's pSkin to the skinid that was written, change [playerid] to [id] if you want to use /setskin ID xd
//Anywhere in your script(I have it at the bottom :p)
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
//LoadUser stuff, like pScore etc.
INI_Int("Skin",PlayerInfo[playerid][pSkin]);
return 1;
}
As i said before, i'm not sure if it would work, but oh well xd