Dialog Problem
#1

All work fine with the dialogs. I add the /rules, "Accept" and "Leave" because I rewrite the gamemode to ZCMD. And I got a problem. When I accept rules, it says You have accepted our rules, and after that SERVER: Unknown command.
The dialog of rules.
pawn Код:
if(dialogid == 2) {
        if(response) {
            SendClientMessage(playerid,0x0096FFFF,"You accepted our rules!");
        }
        else if(response == 0) {
            SendClientMessage(playerid,COLOR_RED,"Therefore leave!");
            Kick(playerid);
        }
    }
    return 1;
}
I had only the /tgoto (disable goto)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1) {
        if(response) {
            if(listitem == 0) {
                AllowGoto[playerid] = 1;
                SendClientMessage(playerid, COLOR_ORANGE, "You have allowed other players teleporting to you!");
            }
            if(listitem == 1) {
                AllowGoto[playerid] = 0;
                SendClientMessage(playerid, COLOR_ORANGE, "You have disallowed other players teleporting to you!");
            }
        }
        return 1;
    }
    return 1;
}
And when I add the dialog from the rules
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1) {
        if(response) {
            if(listitem == 0) {
                AllowGoto[playerid] = 1;
                SendClientMessage(playerid, COLOR_ORANGE, "You have allowed other players teleporting to you!");
            }
            if(listitem == 1) {
                AllowGoto[playerid] = 0;
                SendClientMessage(playerid, COLOR_ORANGE, "You have disallowed other players teleporting to you!");
            }
        }
        return 1;
    }
    if(dialogid == 2) {
        if(response) {
            SendClientMessage(playerid,0x0096FFFF,"You accepted our rules!");
        }
        else if(response == 0) {
            SendClientMessage(playerid,COLOR_RED,"Therefore leave!");
            Kick(playerid);
        }
    }
    return 1;
}
And I cannot return 1; there. What to do
Reply


Messages In This Thread
Dialog Problem - by Kostas' - 30.10.2011, 09:03
Re: Dialog Problem - by knackworst - 30.10.2011, 09:21
Re: Dialog Problem - by Speed - 30.10.2011, 09:24
Re: Dialog Problem - by Kostas' - 30.10.2011, 09:33
Re: Dialog Problem - by SmiT - 30.10.2011, 10:02
Re: Dialog Problem - by Kostas' - 30.10.2011, 12:02
Re: Dialog Problem - by SmiT - 30.10.2011, 12:07
Re: Dialog Problem - by Kostas' - 30.10.2011, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)