SA-MP Forums Archive
Como resetar todas as contas - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: Como resetar todas as contas (/showthread.php?tid=216962)



Como resetar todas as contas - Power_GamerX - 26.01.2011

pessoal olha eu tenho esse cmd aki:

pawn Код:
if (strcmp(cmd, "/resetarconta", true)==0)
    {
        if((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=6)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USE: /resetarconta [Nome_Sobrenome]");
                return 1;
            }
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(giveplayer));
            format(string, 256, "[ADMIN]: %s resetou a conta de %s", sendername, tmp);
            ABroadCast(COLOR_YELLOW,string,1);
            format(string, 256, "[ADMIN]: %s resetou a conta de %s", sendername, tmp);
            printf(string);
            format(string,sizeof(string),"%s.ini",tmp);
            fremove(string);
            SendClientMessage(playerid, COLOR_WHITE, "Player resetado");
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
        }
        return 1;
    }
ele sу reseta a conta que vc digita mais tipo eu queria saber como й possivel faser um cmd assim que resete todas as contas й possivel ?


Re: Como resetar todas as contas - Macintosh - 26.01.2011

Faz um loop pra apagar todas da pasta.


Re: Como resetar todas as contas - TiagoPS - 26.01.2011

n ei se e possivel pois sao muitos nomes em uma pasta sу
acho q o mais eficaz e CTRL+A DEL


Re: Como resetar todas as contas - Fabricio_Rios - 26.01.2011

/\ +1

hahahah eu ri


Re: Como resetar todas as contas - Power_GamerX - 26.01.2011

sim eu ja tentei deletar mais assim cara quando o cara entra com o mesmo nome ele se loga normalmente


Re: Como resetar todas as contas - Oddie - 26.01.2011

Simple, й sу resetar as variavйis do jogador( Vip, nivel, Vida Etc. ...);

Vou dar um exemplo:
pawn Код:
if(!strcmp(cmtext,"/Resetme", true))
{
     PlayerInfo[playerid][pLevel] = 0;
     PlayerInfo[playerid][pVip] =  0;
     PlayerInfo[playerid][pMatou] = 0;
     return 1;
}

Este Cуdigo que vocк fez ai acima й "Apagar Conta do Player" Nгo resetar.



Espero ter ajudado.