30.10.2011, 09:03
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.
I had only the /tgoto (disable goto)
And when I add the dialog from the rules
And I cannot return 1; there. What to do
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;
}
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;
}
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;
}