textdraws or normal command
#1

For command like these:
pawn Код:
/cmd [option 1][option 2][option 3 for some options 2]
Is it better to keep it like that or make it with textdraws?Like /cmd and textdraws appear with the same options and....
Reply
#2

Do whatever you like but i wouldnt use them both i would use dialog instead

PHP код:
ShowPlayerDialog(playeridDIALOG_HELPDIALOG_STYLE_MSGBOX"cmds""1. Cmd\n2. Cmd 2\n3. Cmd3""ok"""); 
Reply
#3

Chat message... Servers that show command usages in a TextDraw are usually the ones that are the lame ones.
Reply
#4

I am not using it for showing usage,it's like you do /cmd option option or you do /cmd and a dialog or a textdraw show with option names and you click on them and it does the command..
Reply
#5

i would recommend dialogs you can make something like that

PHP код:

#include <a_samp>
#include <zcmd>

#define DIALOG_CMDS 100
#define SPD ShowPlayerDialog
#define M DIALOG_STYLE_INPUT

CMD:cmds(playeridparams[])
{
    
SPD(playeridDIALOG_CMDSM"CMDS""1. /ls\n2. /sf\n3. /lv""Ok""Cancel");
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_CMDS)
    {
        if(
response)
        {
            if(!
strlen(inputtext)) return SPD(playeridDIALOG_CMDSM"CMDS""1. /ls\n2. /sf\n3. /lv""Ok""Cancel");
            else
            {
                 if(!
strcmp"1"inputtexttrue)) //if player type in the input 1 it will use /ls
                 
{
                     
SendClientMessage(playerid, -1"CMD used {FFFF00}ls");
                     
SetPlayerPos(playeridxyz); //ls
                 
}
                 if(!
strcmp"2"inputtexttrue)) //if player type in the input 1 it will use /sf
                 
{
                     
SendClientMessage(playerid, -1"CMD used {FFFF00}sf");
                     
SetPlayerPos(playeridxyz); //sf
                 
}
                 if(!
strcmp"3"inputtexttrue)) //if player type in the input 1 it will use /lv
                 
{
                     
SendClientMessage(playerid, -1"CMD used {FFFF00}lv");
                     
SetPlayerPos(playeridxyz); //lv
                 
}
            }
        }
    }
    return 
1;

Reply
#6

I get it but which one do people prefer?Normal typing for commands or clicking on textdraws or dialogs?
Reply
#7

Both
Reply
#8

I find commands to be extremely player unfriendly. I try to use as few commands as possible. The original game doesn't use written commands so your gamemode shouldn't either. You can't get around them for certain administrative tasks but using them for key gameplay elements is a no-no in my book.
Reply
#9

I love commands. That's why I love servers that give players the offer to use both (dialog input + command params).

For example /Cash, some servers only support /Cash [playerid] [$$$] and others show 2 dialogs for those 2 values (even if you already typed the values). The best Servers (not generally best Servers, just regarding this topic) however feature both ways. Dialogs are way user friendlier, like Vince said, but still Commands are more efficient in my opinion especially because you can easily repeat them. Also if I have to type "/Cash" anyway I can just attach those 2 values as well, imo.

This is of course different for Commands that are letting you only select X options - a list dialog is obviously the best choice here or a clickable TextDraw if it makes sense.

You could do the same for the TextDraw Selection (Allow Commands & TextDraw), if you worry about what is better. But if you do it, it is important to do it consistently, otherwise Players may get confused why /Cash allows both and /Report only supports the Command.
Reply
#10

Commands like /givecash (id/name) (amount) are fine as commands, and are horribly a waste of time as dialogs (they can even frustrate you). Commands like /buycar (car name) are better as menus.

TextDraw menus used in CnR server aren't for everyone, implement an option to toggle between the menus and dialogs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)