[Ajuda] Como colocar "Motivo" nos comandos?
#1

Ei gente, como coloco motivo? Exemplo:

O jogador jonathan procurou o player teste motivo: "TH"

ou

O jogador jonathan prendeu o player teste motivo: "Procurado"

ai o player q escolhe o motivo

/procurar [id] [motivo]
Reply
#2

Nгo intendi oq vocк quer fazer :\
Reply
#3

https://sampwiki.blast.hk/wiki/Strtok
Reply
#4

Procure por strtok OU use o plugin + include sscanf
Reply
#5

tens ae um exemplo feito em zcmd juntamente com sscanf

pawn Код:
CMD:lindo(playerid, params[])
{
    new string[256], id, motivo[64], pname[MAX_PLAYER_NAME];
    GetPlayerName(id, pname, sizeof(pname));

    if(sscanf(params, "us[64]", id, motivo))
    {
        SendClientMessage(playerid, Vermelho, "Digite: /lindo [id] [motivo]");
        return 1;
    }
    format(string, sizeof(string), "%s e lindo. Motivo: %s ( /afk )", pname, AFKMotivo);
    SendClientMessageToAll(-1, string);
    return 1;
}
Reply
#6

Obrigado PT, consegui, vlw a todos !!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)