[HELP] skin changing
#1

Hello I set myself skin id 286 before that skin I have 165 skin id and ok I go out from server close server and in my file stats it set 286 and I again go to the server and the skin is back 165 and in my file stats skin id is 165
Reply
#2

I find a hard time understanding what you are writing, can you please try and re-write it?
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)