26.07.2015, 23:32
Toda Hora Que Fecho o Samp-Server Ou dou GMX LA , Reseta Tudo '-'
Olha Meu Codigo
Olha Meu Codigo
PHP код:
//------Topo DO gm-------//
enum Info
{
Matou,
Morreu,
Score,
pAdmin,
};
new pInfo[MAX_PLAYERS][Info];
//------Quando o Player Registra !-------//
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
DOF2::CreateFile(String);
DOF2::SetString(String,"Senha", inputtext);
DOF2::SetInt(String,"Dinheiro", DinheiroInicio);
DOF2::SetInt(String, "Matou", pInfo[playerid][Matou]);
DOF2::SetInt(String, "Morreu", pInfo[playerid][Morreu]);
DOF2::SetInt(String, "Score", GetPlayerScore(playerid));
DOF2::SetInt(String, "Admin", pInfo[playerid][pAdmin]);
DOF2::SaveFile();
//------Funзao Para Salvar o Player---------//
stock SalvarPlayer(playerid)
{
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
DOF2::SetInt(String,"Dinheiro", GetPlayerMoney(playerid));
DOF2::SetInt(String, "Matou", pInfo[playerid][Matou]);
DOF2::SetInt(String, "Morreu", pInfo[playerid][Morreu]);
DOF2::SetInt(String, "Score", GetPlayerScore(playerid));
DOF2::SetInt(String, "Admin", pInfo[playerid][pAdmin]);
DOF2::SaveFile();
return true;
}
//----Funзao Para Carregar o Player-----//
stock CarregarPlayer(playerid)
{
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), CONTAS, Nome);
GivePlayerMoney(playerid, DOF2::GetInt(String,"Dinheiro"));
pInfo[playerid][Matou] = DOF2::GetInt(String, "Matou");
pInfo[playerid][Morreu] = DOF2::GetInt(String, "Morreu");
SetPlayerScore(playerid, DOF2::GetInt(String,"Score"));
pInfo[playerid][pAdmin] = DOF2::GetInt(String,"Admin");
DOF2::SaveFile();
return true;
}