SA-MP Forums Archive
How to make skin save? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make skin save? (/showthread.php?tid=143783)



How to make skin save? - hardstop - 24.04.2010

how can i make like skin save? on disconnect, on restart etc...


Re: How to make skin save? - cessil - 24.04.2010

save the skin id as an integer and get the skin id using GetPlayerSkin


Re: How to make skin save? - [HiC]TheKiller - 24.04.2010

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  new Pname[24];
  GetPlayerName(playerid, Pname, 24);
  dini_IntSet("Skins.ini", Pname, GetPlayerSkin(playerid));
  return 1;
}

public OnPlayerSpawn(playerid)
{
  new Pname[24];
  GetPlayerName(playerid, Pname, 24);
  SetPlayerSkin(playerid, dini_Int("Skins.ini", Pname));
  return 1;
}
Dini is needed.