09.01.2011, 10:56
I got a problem. When I now read the file out I get a totaly wrong skinid. In the file the skinid is 93, but when I connect it sets my skin to 53. I never used this number before...I can't even find a 53 in my script (in coordinates of course). Here is the code:
The .ini File:
pawn Code:
forward LoadUserData(playerid, name[ ], value[ ]);
pawn Code:
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid, PlayerInfo[playerid][userskin]);
return 1;
}
pawn Code:
OnPlayerConnect(...)
{
if(fexist(PlayerInfo[playerid][userfile]))
{
INI_ParseFile(PlayerInfo[playerid][userfile], "LoadUserData", false, true, playerid);
}
}
pawn Code:
public LoadUserData(playerid, name[ ], value[ ])
{
if (!strcmp(name, "Skin"))
{
format(PlayerInfo[playerid][userskin], 3, "%i", value);
SetPlayerSkin(playerid, PlayerInfo[playerid][userskin]);
}
}
pawn Code:
Skin = 93