Dialog Problem
#4

Quote:
Originally Posted by knackworst
Посмотреть сообщение
I had troubles with zcmd too... Are u sure u implented the two new callbacks that ces wity zcmd in ur script?
What do you mean, I didn't understand it.

Quote:
Originally Posted by Speed
Посмотреть сообщение
ZCMD commands must at the end have

pawn Код:
return 1;
if they dont have that they will send SERVER: Unknown command

if you dont now how to fix it, pls give me cmd after whos is that message
Well, I will post before and after /rules.
Before:
pawn Код:
CMD:tgoto(playerid, params[])
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFFFF}Toggle Goto", "{00FF00}Enable\n{FF0000}Disable", "Select", "Cancel");
    return 1;
}
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;
}
After:
pawn Код:
CMD:tgoto(playerid, params[])
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{FFFFFF}Toggle Goto", "{00FF00}Enable\n{FF0000}Disable", "Select", "Cancel");
    return 1;
}
CMD:rules(playerid, params[])
{
    ShowPlayerDialog(playerid,2 ,DIALOG_STYLE_MSGBOX,"{00FFFF}Rules","* Do not hack/cheat\n* Do not use Mods that will give you an advantage over other players\n* Do not be offensive to other players and admins\n* Do not use offensive or racist usernames\n* Do not spawnkill at the spawnpoints\n* Do not PM admins with requests for extra features, instead post it on the forum in Suggestions\n* Do not ask for Admin Status","Accept","Don't accept");
}
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;
}
Because I cannot return 1; on the end on the OnDialogResponse, it appears SERVER: Uknown comman
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)