[Duvida]Conversгo de tmp em sscanf.
#1

Boa noite, estou aprendendo a usar zcmd+ sscanf e tenho uma duvida, como converto tmp, no caso esse code abaixo para zcmd e sscanf?
Ja tentei usar um code com params[0] mas o servidor se desligou ao executar esse comando, estranho...


pawn Код:
if (strcmp(cmd, "/resetarconta", true)==0)
    {
        if((IsPlayerAdmin(playerid)))
        {
                new string[40];
            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, sizeof(string),"Arquivos/%s.ini",tmp);
                        dini_Remove(string);
        }
        return 1;
    }
Reply
#2

PHP код:
CMD:resetarconta(playeridparams[])
{
    if((
IsPlayerAdmin(playerid)))
     {
        new 
string[40],
        
conta[MAX_PLAYER_NAME];
        if(
sscanf(params"s[24]"conta)) return SendClientMessage(playerid, -1"Correto: /resetarconta [Conta]");
        
format(stringsizeof(string),"Arquivos/%s.ini",conta);
        
dini_Remove(string);
      }
      else return 
SendClientMessage(playerid, -1"Noob HAHA");
    return 
true;

Nem sei se ta muito certo ;s
Reply
#3

Obrigado por esclarecer minha duvida ousen, funfou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)