16.08.2014, 09:30
Hi people, im having a loading stats problem , well not stats, loading skin!
When player disconnect it saves his skin in my user path normally but when he join he join with CJ skin!!!
any help? script below..
saving :
and loading :
onplayerspawn :
Help me!!!!
When player disconnect it saves his skin in my user path normally but when he join he join with CJ skin!!!
any help? script below..
saving :
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new sID = GetPlayerSkin(playerid);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player's Skin");
INI_WriteInt(File,"pSkin",sID);
INI_Close(File);
}
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("pSkin",PlayerInfo[playerid][pSkin]);
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
return 1;
}