Quote:
Originally Posted by amirab
where did you changed it's var : PlayerInfo[playerid][pSkin]
i mean you should get player skin to set on it where did you set?
|
I dont know if i understand your question, but the skin is set as 299 when the player registers, and then it is saved when the player logs out. When he logs in again, the script loads his skin, but somewhy it isnt working.
Quote:
Originally Posted by biker122
Ewww... Let me change your /skin command
pawn Код:
CMD:skin(playerid,params[]) { pInfo[playerid][pSkin] = GetPlayerSkin(playerid); GameTextForPlayer(playerid,"~r~Skin Saved!",3000,5); return 1; }
Explaination: Now, if you execute the command /skin, it'll save your current skin to pInfo[playerid][pSkin].
If you want the same skin to be used after relogging and stuffs, go to your OnPlayerDisconnect and add
pawn Код:
INI_WriteInt(File,"Skin",pInfo[playerid][pSkin]);
and load it when he connects.
|
Thats not what i want. My /skin command isnt wrong, i just made it to test the PlayerInfo[playerid][pSkin], it was made to set the skin, not to save it.
When the player logs out there is already there is already a function for saving its data, including the skin
pawn Код:
// Saving it
INI_WriteInt(playerFile,"Skin",PlayerInfo[playerid][pSkin]);
// Loading it
INI_Int("Skin",PlayerInfo[playerid][pSkin]);
as i said before, the problem isnt on loading or saving the skin, it is on setting it after login.