Help please. Skin save
#4

Quote:
Originally Posted by [TGCAR
KotZ ]
use dini to save

for save skin recomend use save onplayerdisconect
Code:
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Leaders\\%s.ini", pname);//leader the name of your folder in scriptfiles
if(!dini_Exists(file))
dini_Create(file);
dini_IntSet(file, "skin", GetPlayerSkin(playerid));
for load the skin recomend use load on playerspawn
Code:
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Leaders\\%s.ini", pname);
if(dini_Exists(file))
{
SetTimerEx("SpawnSave", 100, false, "d", playerid);
}
and for end you will need that add this in the end of your script
Code:
forward SpawnSave(playerid);
public SpawnSave(playerid)
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Leaders\\%s.ini", pname);
SetPlayerSkin(playerid, dini_Int(file, "skin"));
return 1;
}
That's too bad that it doesn't work.
Reply


Messages In This Thread
Help please. Skin save - by bartje01 - 21.01.2010, 18:25
Re: Help please. Skin save - by akis_tze - 21.01.2010, 21:02
Re: Help please. Skin save - by akis_tze - 21.01.2010, 21:04
Re: Help please. Skin save - by xkniives - 24.01.2010, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)