SA-MP Forums Archive
Dialog to CMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog to CMD (/showthread.php?tid=654384)



Dialog to CMD - hasantemur - 27.05.2018

I write "/car" and open "dialog list" and click "Open Engine" and "CMD:engine" want the command to work.




Re: Dialog to CMD - Gammix - 27.05.2018

So ZCMD make commands as functions, so you can simply do this: (just like to make alias for commands)
PHP код:
public OnDialogResonse(playeriddialogidresponselistiteminputtext[]) {
    if (
dialogid == dialog_id_here) {
        if (
response) {
            switch (
listitem) {
                case 
engine_case_number: {
                    return 
cmd_engine(playerid""); // if the command do not have a "params[]", then remove ""
                
}
            }
        }
    }