[HELP] Possible?
#1

Is it possible to make it when i type /commands, then the dialog with commands come up, then i click on "call after food delivery" then i want it to type /food

like i just type(ingame): t/food

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/commands", true))
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Thing!", "Call after food delivery", "call", "Cancel");
    return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
        case 1:
            {
            switch(listitem)
                {
                //Food Delivery-------------------------------------------------
                    case 0:
                    {
                        SendClientCommand(playerid, "/food"); //something like that =/... i just guessed
                    }
                //--------------------------------------------------------------
                }
            }
       }
   }
return 1;
}
Reply
#2

Suggest looking into DCMD or ZCMD. Believe you could make a direct call to the function then. Not to mention, it's a whole lot faster.
Reply
#3

Simple as this:
Код:
CallLocalFunction("OnPlayerCommandText","is",playerid,"/food");
Reply
#4

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Simple as this:
Код:
CallLocalFunction("OnPlayerCommandText","is",playerid,"/food");
LoL thanks :P
Reply
#5

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Simple as this:
Код:
CallLocalFunction("OnPlayerCommandText","is",playerid,"/food");
or... It dident work nothing show up =/
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)