[Ajuda] Menu de click
#27

Eu testei em um new e deu perfeitamente, vocк nгo soube aplicar ai...
pawn Code:
#include <a_samp>

main()
{
    print("Teste");
    return 1;
}

#define RelatoADM 1

new IsAdmin[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/admin",true))
    {
        IsAdmin[playerid] = 1;
        return 1;
    }
    if(!strcmp(cmdtext,"/relato",true))
    {
        ShowPlayerDialog(playerid, RelatoADM, DIALOG_STYLE_INPUT,"Relato","Informe o seu relato para os admins online.","Enviar","Cancelar");
        return 1;
    }
    return SendClientMessage(playerid, -1, "[WRONG] - Comando inexistente.");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == RelatoADM)
    {
        if(response)
        {
            new
                wiiStr[128],
                wiiN[MAX_PLAYER_NAME]
            ;

            for(new x, i = GetMaxPlayers(); x < i; x++)
            {
                if(!IsPlayerConnected(x)) continue;
                if(IsAdmin[x] >= 1)
                {
                    GetPlayerName(playerid, wiiN, sizeof( wiiN ));
                    format(wiiStr,sizeof(wiiStr),"[Relato] %s: %s",wiiN, inputtext);
                    SendClientMessage(x, -1, wiiStr);
                    return 1;
                }
            }
        }
        return 1;
    }
    return 1;
}
Digite /admin para poder ler o relato, e depois envie o /relato (:
Reply


Messages In This Thread
[Ajuda] Menu de click - by SERRA93 - 13.10.2011, 20:19
Re: Menu de click - by WLSF - 13.10.2011, 20:31
Re: Menu de click - by SERRA93 - 13.10.2011, 21:07
Re: Menu de click - by [O.z]Caroline - 13.10.2011, 21:12
Re: Menu de click - by WLSF - 13.10.2011, 21:12
Re: Menu de click - by [O.z]Caroline - 13.10.2011, 21:14
Re: Menu de click - by WLSF - 13.10.2011, 21:16
Re: Menu de click - by SERRA93 - 13.10.2011, 21:40
Re: Menu de click - by WLSF - 13.10.2011, 21:42
Re: Menu de click - by SERRA93 - 13.10.2011, 21:45
Re: Menu de click - by WLSF - 13.10.2011, 21:48
Re: Menu de click - by SERRA93 - 13.10.2011, 22:07
Re: Menu de click - by WLSF - 13.10.2011, 22:19
Re: Menu de click - by SERRA93 - 13.10.2011, 22:24
Re: Menu de click - by WLSF - 13.10.2011, 22:31
Re: Menu de click - by SERRA93 - 13.10.2011, 22:56
Re: Menu de click - by SERRA93 - 13.10.2011, 23:04
Re: Menu de click - by WLSF - 13.10.2011, 23:12
Re: Menu de click - by SERRA93 - 13.10.2011, 23:16
Re: Menu de click - by WLSF - 13.10.2011, 23:19
Re: Menu de click - by SERRA93 - 13.10.2011, 23:22
Re: Menu de click - by SERRA93 - 13.10.2011, 23:25
Re: Menu de click - by WLSF - 13.10.2011, 23:27
Re: Menu de click - by SERRA93 - 13.10.2011, 23:30
Re: Menu de click - by WLSF - 13.10.2011, 23:31
Re: Menu de click - by SERRA93 - 13.10.2011, 23:33
Re: Menu de click - by WLSF - 13.10.2011, 23:43
Re: Menu de click - by SERRA93 - 13.10.2011, 23:50
Re: Menu de click - by WLSF - 13.10.2011, 23:52
Re: Menu de click - by SERRA93 - 13.10.2011, 23:55
Re: Menu de click - by WLSF - 13.10.2011, 23:56
Re: [Ajuda] Menu de click - by SERRA93 - 14.10.2011, 00:00
Re: [Ajuda] Menu de click - by WLSF - 14.10.2011, 00:05
Re: [Ajuda] Menu de click - by SERRA93 - 14.10.2011, 00:23
Re: [Ajuda] Menu de click - by WLSF - 14.10.2011, 00:29
Re: [Ajuda] Menu de click - by SERRA93 - 14.10.2011, 00:34

Forum Jump:


Users browsing this thread: 13 Guest(s)