[Ajuda] Aplicar comando a player offline
#5

@Edit: eu peguei 1 cmd e editei.fico assim:
pawn Код:
if(strcmp(cmd, "/retirarvip", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 1340)
        {

            new plnamex[MAX_PLAYER_NAME];
            GetPlayerName(playerid, plnamex, sizeof(plnamex));
            format(gstring, 64, "Contas/%s.ini", plnamex);
            tmp = strtok(cmdtext, idx);
             new arquivoa[35];
             format(arquivoa,35,"Contas/%s.ini",plnamex);
            if(!DOF2_FileExists(arquivoa))
            {
            SendClientMessage(playerid, COLOR_GRAD2, "O player nгo existe.");
            }
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /retirarvip [Nome correto do player].");
                return 1;
            }
            else
            {

            new File: filex = fopen(arquivoa, io_read);
              if (filex)
              {
                new valor;
                valor = 0;
                DOF2_SetInt(arquivoa,"Vip",valor);
                SendClientMessage(playerid, COLOR_GRAD2, "O valor foi resetado com sucesso.");
                return 1;
               }
               fclose(filex);
               SendClientMessage(playerid, COLOR_GRAD2, "Fail");
               }
        }
      return 1;
    }
]
Ele da sucesso no comando,mas nгo retira o vip.
Reply


Messages In This Thread
Aplicar comando a player offline - by Senhor_Azul - 07.11.2012, 17:17
Re: Aplicar comando a player offline - by [JD]BlackFire - 07.11.2012, 17:19
Re: Aplicar comando a player offline - by Senhor_Azul - 07.11.2012, 17:34
Re: Aplicar comando a player offline - by zSuYaNw - 07.11.2012, 17:36
Re: Aplicar comando a player offline - by Senhor_Azul - 07.11.2012, 17:51
Re: Aplicar comando a player offline - by @Riichard - 07.11.2012, 18:56

Forum Jump:


Users browsing this thread: 1 Guest(s)