[Tutorial] Usando y_commands e sscanf
#42

Quote:
Originally Posted by Input
Посмотреть сообщение
O Parametro help ele imprime quando usamos os comandos?

Exemplo:

Comando:
pawn Код:
YCMD:mensagem(playerid, params[], help)
{
    new msg[40];
    if( help ) return SendClientMessage(playerid, -1, "Nota: Este comando serve para mandar uma mensagem.");
    if( sscanf( params, "s", msg ) ) return SendClientMessage(playerid, -1, "Uso: /mensagem [texto]");
    SendClientMessageToAll(0xC0C0C0AA, msg);
    return 1;
}
Irб imprimir:
Код:
Nota: Este comando serve para mandar uma mensagem.
Uso: /mensagem [texto]
Correto?
Errado, testa:

pawn Код:
YCMD:mensagem(playerid, params[], help)
{
    if( help )
        SendClientMessage(playerid, -1, "Este comando serve para mandar uma mensagem.");
    new ptstr[128];
    if (isnull(params))
    {
        format(ptstr, sizeof (ptstr), "Uso: \"/%s [acao]\"", Command_GetDisplayNamed("mensagem", playerid));
        SendClientMessage(playerid, -1, ptstr);
    }
    else
    {
        format(ptstr, sizeof(ptstr), "%s", params);
        SendClientMessageToAll(0xC0C0C0AA, ptstr);
    }
    return 1;
}

Quote:
Originally Posted by lucas_mdr1235
Посмотреть сообщение
VLW deu certo mesmo mas sу que essa funзгo nгo tem como usar ela fora dos comandos mas ta de boa VLW ! ! !
Ainda bem que deu certo.
Reply


Messages In This Thread
Usando y_commands e sscanf - by PT - 26.08.2013, 03:32
Re: Usando y_commands e sscanf - by Diogo123 - 26.08.2013, 05:41
Re: Usando y_commands e sscanf - by PT - 26.08.2013, 05:58
Re: Usando y_commands e sscanf - by darkxdll - 26.08.2013, 12:17
Re: Usando y_commands e sscanf - by Juninho_Oakley - 26.08.2013, 15:59
Re: Usando y_commands e sscanf - by PT - 26.08.2013, 18:23
Re: Usando y_commands e sscanf - by smiiir - 26.08.2013, 21:36
Re: Usando y_commands e sscanf - by WLSF - 26.08.2013, 22:02
Re: Usando y_commands e sscanf - by PT - 26.08.2013, 23:03
Re: Usando y_commands e sscanf - by Juniiro3 - 26.08.2013, 23:16
Re: Usando y_commands e sscanf - by PT - 26.08.2013, 23:31
Re: Usando y_commands e sscanf - by Juniiro3 - 26.08.2013, 23:33
Re: Usando y_commands e sscanf - by PT - 27.08.2013, 00:17
Re: Usando y_commands e sscanf - by Juniiro3 - 27.08.2013, 00:46
Re: Usando y_commands e sscanf - by PT - 27.08.2013, 00:53
Re: Usando y_commands e sscanf - by mau.tito - 27.08.2013, 10:11
Re: Usando y_commands e sscanf - by PT - 27.08.2013, 13:35
Re: Usando y_commands e sscanf - by Renancito10 - 01.09.2013, 16:24
Re: Usando y_commands e sscanf - by PT - 01.09.2013, 17:28
Re: Usando y_commands e sscanf - by Schocc - 01.09.2013, 18:48
Re: Usando y_commands e sscanf - by PT - 01.09.2013, 18:55
Re: Usando y_commands e sscanf - by Schocc - 01.09.2013, 19:07
Re: Usando y_commands e sscanf - by PT - 01.09.2013, 19:21
Re: Usando y_commands e sscanf - by LeMoi - 03.09.2013, 22:17
Re: Usando y_commands e sscanf - by PT - 03.09.2013, 22:34
Re: Usando y_commands e sscanf - by Lуs - 04.09.2013, 02:59
Re: Usando y_commands e sscanf - by PT - 04.09.2013, 08:03
Re: Usando y_commands e sscanf - by bruxo00 - 13.10.2013, 12:23
Re: Usando y_commands e sscanf - by lucas_mdr1235 - 09.02.2014, 11:26
Re: Usando y_commands e sscanf - by PT - 09.02.2014, 11:32
Re: Usando y_commands e sscanf - by lucas_mdr1235 - 09.02.2014, 11:51
Re: Usando y_commands e sscanf - by PT - 09.02.2014, 12:08
Re: Usando y_commands e sscanf - by lucas_mdr1235 - 28.02.2014, 13:55
Re: Usando y_commands e sscanf - by PT - 28.02.2014, 14:12
Re: Usando y_commands e sscanf - by lucas_mdr1235 - 28.02.2014, 14:23
Re: Usando y_commands e sscanf - by PT - 28.02.2014, 14:32
Re: Usando y_commands e sscanf - by lucas_mdr1235 - 28.02.2014, 14:42
Re: Usando y_commands e sscanf - by N3XTMapper - 28.02.2014, 14:46
Re: Usando y_commands e sscanf - by Wanderson_SAMP - 28.02.2014, 16:44
Re: Usando y_commands e sscanf - by Input - 28.02.2014, 17:05
Re: Usando y_commands e sscanf - by lucas_mdr1235 - 28.02.2014, 17:55
Re: Usando y_commands e sscanf - by PT - 28.02.2014, 19:44
Re: Usando y_commands e sscanf - by Input - 28.02.2014, 19:49
Re: Usando y_commands e sscanf - by PT - 28.02.2014, 19:50
Re: Usando y_commands e sscanf - by Schocc - 01.03.2014, 02:17
Re: Usando y_commands e sscanf - by N3XTMapper - 01.03.2014, 02:22
Re: Usando y_commands e sscanf - by Schocc - 01.03.2014, 03:21
Re: Usando y_commands e sscanf - by PT - 01.03.2014, 10:30
Re: Usando y_commands e sscanf - by Schocc - 01.03.2014, 11:08
Re: Usando y_commands e sscanf - by PT - 01.03.2014, 11:21
Re: Usando y_commands e sscanf - by CharlieSanchez - 31.03.2014, 11:43
Re: Usando y_commands e sscanf - by PT - 13.12.2015, 13:12

Forum Jump:


Users browsing this thread: 10 Guest(s)