[Ajuda] /MudarNick cria novo arquivo (conta) bugado
#2

Код:
    if(dialogid == DIALOG_TROCAR_NICK2)
    {
        if(response)
        {
            new Nick[24], newname[100];
            format(newname, sizeof newname, Pasta_Contas, newnick);
            if(strlen(inputtext) <= 0)
            {
                SendClientMessage(playerid, Vermelho, "Vocк tem que digitar um novo nick.");
                ShowPlayerDialog(playerid, DIALOG_TROCAR_NICK2 , DIALOG_STYLE_INPUT, "{00FF00}Trocar Nick", "{FF0000}Ops!\n\n{FFFFFF}Digite seu novo nick:", "Mudar", "Cancelar");
                return 1;
            }
            if(strlen(inputtext) > 25)
            {
                SendClientMessage(playerid, Vermelho, "Vocк digitou um nick muito grande.");
                ShowPlayerDialog(playerid, DIALOG_TROCAR_NICK2, DIALOG_STYLE_INPUT, "{00FF00}Trocar Nick", "{FF0000}Ops!\n\n{FFFFFF}Vocк digitou um nick muito grande.\n\nDigite seu novo nick:", "Mudar", "Cancelar");
                return 1;
            }
            if(DOF2_FileExists(newname))
            {
                SendClientMessage(playerid, Vermelho, "O nick que vocк digitou jб existe!");
                ShowPlayerDialog(playerid, DIALOG_TROCAR_NICK2, DIALOG_STYLE_INPUT, "{00FF00}Trocar Nick", "{FF0000}Ops!\n\n{FFFFFF}O nick que vocк digitou jб existe!\n\nDigite outro nick:", "Mudar", "Cancelar");
            }
            else
            {
                SendClientFormatToAll(Amarelo, "[NICK] O(A) jogador(a) %s trocou seu nick para %s ( %02d/%02d/%04d - %02d:%02d )", PlayerName(playerid), inputtext, Dia, Mes, Ano, Hora, Minuto);
                SendClientMessage(playerid, -1, "[NICK] Nick alterado com sucesso!");
                SendClientFormat(playerid, -1, "[NICK] A sua conta ({B5B5B5} %s {FFFFFF}) foi removida e o seu nick atual й ({B5B5B5} %s {FFFFFF}).", PlayerName(playerid), inputtext);
                SendClientMessage(playerid, -1, "[NICK] Tire um PrintScreen apertando '{B5B5B5}F8{FFFFFF}' para nгo esquecer!");
                DOF2_RenameFile(File, newnick);
                SetPlayerName(playerid, inputtext);
                KillTimer(TimerNick[playerid]);
                GivePlayerMoney(playerid, -20000);
                NickLiberado[playerid] = 0;
            }
        }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)