#include <a_samp>#define DIALOG_LIST (500)public OnFilterScriptInit() { return 1; }public OnFilterScriptExit() { return 1; }public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG_LIST){switch(listitem){ case 0: { // kód } case 1: { // kód } case 2: { // kód } case 3: { // kód } case 4: { // kód }}}return 0;}public OnPlayerCommandText(playerid,cmdtext[]){if(!strcmp(cmdtext,\"/dialog\",true)){ if(Admin[playerid] == 1) { ShowPlayerDialog(playerid,DIALOG_LIST,DIALOG_STYLE_LIST,\"Fejléc\",\"Func1\\nFunc2\\nFunc3\",\"Ok\",\"Mégse\"); } else if(Admin[playerid] == 2) { ShowPlayerDialog(playerid,DIALOG_LIST,DIALOG_STYLE_LIST,\"Fejléc\",\"Func1\\nFunc2\\nFunc3\\nFunc4\\nFunc5\",\"Ok\",\"Mégse\"); } return 1;}return 0;}
if(dialogid == 13){ switch(listitem){ if(PlayerInfo[playerid][pAdminlevel] == 1) { case 0: // a menüben a neve legyen Valami1 { PlayerInfo[playerid][pValami] = 1; } } if(PlayerInfo[playerid][pAdminlevel] == 2) { case 1: // a menüben a neve legyen Valami2 { PlayerInfo[playerid][pValami] = 10; } } }}
public OnPlayerCommandText(playerid,cmdtext[]){if(!strcmp(cmdtext,\"/dialog\",true)){ if(Admin[playerid] == 1) { ShowPlayerDialog(playerid,DIALOG_LIST,DIALOG_STYLE_LIST,\"Fejléc\",\"Func1\\nFunc2\\nFunc3\",\"Ok\",\"Mégse\"); } else if(Admin[playerid] == 2) { ShowPlayerDialog(playerid,DIALOG_LIST,DIALOG_STYLE_LIST,\"Fejléc\",\"Func1\\nFunc2\\nFunc3\\nFunc4\\nFunc5\",\"Ok\",\"Mégse\"); } return 1;}return 0;}
switch(valami){ if(...)}
switch(valami){ case X:}
ShowPlayerDialog(playerid,DIALOG_LIST,DIALOG_STYLE_LIST,\"Fejléc\",\"Func1\\nFunc2\\nFunc3\\nFunc4\\nFunc5\",\"Ok\",\"Mégse\");
inputtext The text entered into the input box by the player or the selected list item text.