[AJUDA] Salvar
#2

Recomendo usar include DOF2

Quote:

stock SalvarVip(playerid)
{
if(PlayerVip[playerid] >= 1)
{
format(_sStr, 35, "Vips/%s.ini", pNome(playerid));
if(INI_Open(_sStr))// Abre o arquivo!
{
INI_WriteInt("NivelVip", PlayerVip[playerid]);
INI_WriteInt("Profissao", Profissao[playerid]);
INI_Save();
INI_Close();
}
}
return 1;
}
stock CarregarVip(playerid)
{
format(_sStr, 35, "Vips/%s.ini", pNome(playerid));
if(INI_Open(_sStr))// Abre o arquivo!
{
PlayerVip[playerid] = INI_ReadInt("NivelVip");
Profissao[playerid] = INI_ReadInt("Profissao");
INI_Close();
}
return 1;
}

Agora vocк chama essas funзхes na
On‌PlayerConnected = CarregarVip(playerid)
On‌PlayerDiscconect = SalvarVip(playerid)
Reply


Messages In This Thread
[AJUDA] Salvar - by hurubuh - 08.03.2019, 16:33
Re: [AJUDA] Salvar - by k2bi - 08.03.2019, 17:12

Forum Jump:


Users browsing this thread: 1 Guest(s)