05.08.2013, 14:21
Muito melhor assim, mais simples e otimizado
pawn Код:
#include <a_samp>
#include <dini>
//Defines
#define SKINS "Skins/%s.ini"
// variaveis globais, topoda gm/fs
new skinid = GetPlayerSkin(playerid);
new String[90];
public OnPlayerSpawn(playerid)
{
format(String, sizeof(String), SKINS, PlayerName(playerid));
SetPlayerSkin(playerid, dini_Int(String,"Skin"));
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
format(String, sizeof(String), SKINS, PlayerName(playerid));
dini_IntSet(String, "Skin", skinid);
return 1;
}
stock PlayerName(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
return pname;
}