Registro ( DOF2 ) -
AlucardSnow - 20.01.2013
Bom ontem trovejo mt e nao pude terminar o sistema...
Mais ele deu erro hoje!
Eu to fazendo em DOF2, mais ele nao salva o arquivo
eu queria que salva-se nessa pasta: scriptfiles / Contas
Vou colocar o sistema que fiz atй agora, ele nao tem erro em compilamento nao
Tudo que eu fiz:
http://pastebin.com/VZqw24WB
Bom galera me fala aonde errei, porque e me ajuda a resolver, salvar na pasta Contas na scriptfiles =)
Quem puder fazer isso vai ajudar mt =)
Re: Registro ( DOF2 ) -
Schocc - 20.01.2013
Coloque
DOF2_Exit(); na callback
OnFilterScriptExit()
E remova
DOF2_Exit(); de
OnPlayerConnect
Re: Registro ( DOF2 ) -
AlucardSnow - 20.01.2013
E Quanto a pasta?
Aonde esta salvando?
Tem que definir ela pois nao chego nenhum arquivo ainda
Re: Registro ( DOF2 ) -
AlucardSnow - 20.01.2013
Alguem?
Como mandar salvar na pasta Contas que esta dentro da Scriptfiles
Re: Registro ( DOF2 ) -
AlucardSnow - 21.01.2013
Mals o Triple Post
Mais se nao vo criar 1 topico por dia!
Leiam os topicos acima!
Nao esta salvando na pasta
Queria que salva em scriptfiles / Contas
Me Ajudem! CODIGO ACIMA
Re: Registro ( DOF2 ) -
Lуs - 21.01.2013
Vamos fazer uma troca, eu leio seu tуpico e vocк lк as
regras.
Re: Registro ( DOF2 ) -
AlucardSnow - 21.01.2013
BOm eu li as regras.
Mais eu crio varios topicos do mesmo assunto vocКs reclamam.
Mals nao repito mais agora ajuda ? '-'
Re: Registro ( DOF2 ) -
HeyHoLetsGo - 21.01.2013
Mano eu vou tentar ajudar, nгo sei se estб certo, mas vamo lб...
Substitua esta callback e as funзхes:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new file[64], name[24]; // We declare the size of the file
GetPlayerName(playerid,name, sizeof name); // We get the file name
format(file,sizeof file,DOF2_File(name));
DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]); // We set/update the players settings.
DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]);
DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]);
DOF2_SaveFile();
return 1;
}
Por isto:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new file[64], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(file,sizeof(file),"Contas/%d.ini",name);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]);
DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]);
DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]);
DOF2_SaveFile();
}
else
{
DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]);
DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]);
DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]);
DOF2_SaveFile();
}
return 1;
}
OBS: Crie uma pasta "Contas" na pasta "Scriptfiles", senгo, nгo vai dar certo!
Espero que dк certo, depois fala aqui oque deu! (:
Re: Registro ( DOF2 ) -
AlucardSnow - 21.01.2013
Quote:
Originally Posted by HeyHoLetsGo
Mano eu vou tentar ajudar, nгo sei se estб certo, mas vamo lб...
Substitua esta callback e as funзхes:
pawn Код:
public OnPlayerDisconnect(playerid, reason) { new file[64], name[24]; // We declare the size of the file GetPlayerName(playerid,name, sizeof name); // We get the file name format(file,sizeof file,DOF2_File(name)); DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]); // We set/update the players settings. DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]); DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]); DOF2_SaveFile(); return 1; }
Por isto:
pawn Код:
public OnPlayerDisconnect(playerid, reason) { new file[64], name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(file,sizeof(file),"Contas/%d.ini",name); if(!DOF2_FileExists(file)) { DOF2_CreateFile(file); DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]); DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]); DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]); DOF2_SaveFile(); } else { DOF2_SetInt(file, "Matou",PlayerInfo[playerid][pMatou]); DOF2_SetInt(file, "Morreu",PlayerInfo[playerid][pMorreu]); DOF2_SetInt(file, "Money",PlayerInfo[playerid][pMoney]); DOF2_SaveFile(); } return 1; }
OBS: Crie uma pasta "Contas" na pasta "Scriptfiles", senгo, nгo vai dar certo!
Espero que dк certo, depois fala aqui oque deu! (:
|
Salvo com numero o arquivo e as contas.
Me ajuda a colocar pra salvar o nome e a senha dele?
Obrigado me ajudo se poder ajudar denovo =)
Re: Registro ( DOF2 ) -
HeyHoLetsGo - 21.01.2013
Quote:
Originally Posted by AlucardSnow
Salvo com numero o arquivo e as contas.
Me ajuda a colocar pra salvar o nome e a senha dele?
Obrigado me ajudo se poder ajudar denovo =)
|
Pra salvar o nome, vocк usa isso:
pawn Код:
new nome[MAX_PLAYER_NAME];
GetPlayerName(playerid,nome,MAX_PLAYER_NAME);
DOF2_SetString(file,"Nome",nome);
E senha й facil tambйm, vocк cria uma string[64]; pra salvar a senha, tipo, quando ele se registrar vc usa:
pawn Код:
new senha[64];
format(senha,sizeof(senha),"%s",inputtext);
DOF2_SetString(file,"Senha",senha);
Muito facil cara, sу estudar DOF2!