[Ajuda] Salvamento
#3

Po cara valeu pela atenзгo, mais nгo estou conseguindo de forma alguma, pode arrumar o comando para mim por favor?

pawn Код:
CMD:register(playerid,params[])
{
    new
        Senha[32],
        arquivoplayers[64]
    ;
   
    format(arquivoplayers,sizeof(arquivoplayers),"GP/Contas/%s.txt",Nome(playerid));
   
    if(GetPVarInt(playerid,"Registrado") == 1) return SendClientMessage(playerid,red,"You are already registered.");
    if(sscanf(params,"u[32]",Senha)) return SendClientMessage(playerid,red,"USAGE: /register [password]");

    if(DOF2_FileExists(arquivoplayers))
    {
        SendClientMessage(playerid,red,"ERROR: This account is already registered");
    }
    else
    {
        DOF2_CreateFile(arquivoplayers);
        DOF2_SetString(arquivoplayers,"Senha",Senha);
        DOF2_SetInt(arquivoplayers,"Wanted",0);
        DOF2_SetInt(arquivoplayers,"Money",0);
        DOF2_SetInt(arquivoplayers,"Admin",0);
        DOF2_SetInt(arquivoplayers,"Doador",0);
        DOF2_SetInt(arquivoplayers,"Score",0);
        DOF2_SetInt(arquivoplayers,"Matou",0);
        DOF2_SetInt(arquivoplayers,"Morreu",0);
        GivePlayerMoney(playerid,15000);
        PlayerInfo[playerid][Admin] = 1;
        SalvarPlayer(playerid);
        DOF2_SaveFile();

        SendClientMessage(playerid,yellow,"Account registerd.");
    }
   
    SetPVarInt(playerid,"Registrado",1);
    SetPVarInt(playerid,"Logado",1);
    return 1;
}
Reply


Messages In This Thread
Salvamento - by s4kuL - 17.11.2012, 15:52
Re: Salvamento - by MatheusAlcapone - 17.11.2012, 16:03
Re: Salvamento - by s4kuL - 17.11.2012, 16:27
Re: Salvamento - by MatheusAlcapone - 17.11.2012, 16:30
Re: Salvamento - by s4kuL - 17.11.2012, 17:33
Re: Salvamento - by MatheusAlcapone - 17.11.2012, 17:41
Re: Salvamento - by s4kuL - 17.11.2012, 19:13
Re: Salvamento - by CrusherCpt - 17.11.2012, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)