24.04.2011, 03:07
Olб Lucas_. Aqui estб a include:
http://pastebin.com/Gu9UVz1v
Olб JOKERBOY.
Tente desta forma:
Utilize Profissao[playerid] ou entгo troque pelo seu gTeam[playerid]..
Use SalvarDadosPlayer para salvar e CarregarDadosPlayer para carregar:
Atenciosamente,
Falcon.
http://pastebin.com/Gu9UVz1v
Olб JOKERBOY.
Tente desta forma:
Utilize Profissao[playerid] ou entгo troque pelo seu gTeam[playerid]..
Use SalvarDadosPlayer para salvar e CarregarDadosPlayer para carregar:
pawn Код:
new Profissao[MAX_PLAYERS];
new nome[MAX_PLAYER_NAME];
new arquivo[30];
stock SalvarDadosPlayer(playerid)
{
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), "%s.ini", nome);
if(!Fini_Exists(arquivo)) Fini_Create(arquivo);
Fini_OpenFile(arquivo);
Fini_SetStr("Profissao", Profissao[playerid]);
Fini_SetVal("Dinheiro", GetPlayerMoney(playerid));
Fini_SaveFile(arquivo);
Fini_CloseFile();
return true;
}
stock CarregarDadosPlayer(playerid)
{
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), "%s.ini", nome);
if(!Fini_Exists(arquivo))
{
Fini_Create(arquivo);
Fini_OpenFile(arquivo);
Fini_SetVal("Profissao", 0);
Fini_SetVal("Dinheiro", 0);
Fini_SaveFile(arquivo);
return Fini_CloseFile();
}
Fini_OpenFile(arquivo);
Profissao[playerid] = Fini_GetValue("Profissao");
GivePlayerMoney(playerid, Fini_GetValue("Dinheiro"));
Fini_CloseFile();
return true;
}
Falcon.