textdraws or normal command
#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


Messages In This Thread
textdraws or normal command - by iBots - 01.06.2017, 13:37
Re: textdraws or normal command - by Whatname - 01.06.2017, 13:40
Re: textdraws or normal command - by CheezIt - 01.06.2017, 14:00
Re: textdraws or normal command - by iBots - 01.06.2017, 14:40
Re: textdraws or normal command - by Whatname - 01.06.2017, 14:52
Re: textdraws or normal command - by iBots - 01.06.2017, 15:19
Re: textdraws or normal command - by coool - 01.06.2017, 15:33
Re: textdraws or normal command - by Vince - 01.06.2017, 16:48
Re: textdraws or normal command - by NaS - 01.06.2017, 17:29
Re: textdraws or normal command - by CheezIt - 01.06.2017, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)