Dialog msgbox type. -
iGetty - 24.07.2011
I don't understand how to make the responses work on DIALOG_STYLE_MSGBOX, please could I get some help?, thanks.
This is the command.
pawn Код:
command(cctv, playerid, params[])
{
ShowPlayerDialog(playerid, 2525, DIALOG_STYLE_MSGBOX, "CCTV Menu", "Bone County Police Department", "Next", "Close");
SetPlayerCameraPos(playerid, -1273.0756,2654.4063,72.0765);
SetPlayerCameraLookAt(playerid, -1280.4012,2705.9097,50.1230);
return 1;
}
I have this for it, but it just doesn't work, I'm not familiar with MSGBOX typed dialogs.
pawn Код:
case 2525:
{
if(!response)
{
SetPlayerPos(playerid, 123.4, 123.4, 123.4);
SendClientMessage(playerid, WHITE, "You have cancelled the CCTV menu, and was set back to where you last was.");
}
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 4568, DIALOG_STYLE_MSGBOX, "CCTV Camera 2", "Bone County Fire/Medic Department", "Next", "Cancel");
SetPlayerCameraPos(playerid, 320.0, 50.0, 170.0);
SetPlayerCameraLookAt(playerid, 324.34, 54.122, 173.35);
}
}
}
Re: Dialog msgbox type. -
MadeMan - 24.07.2011
pawn Код:
case 2525:
{
if(response)
{
ShowPlayerDialog(playerid, 4568, DIALOG_STYLE_MSGBOX, "CCTV Camera 2", "Bone County Fire/Medic Department", "Next", "Cancel");
SetPlayerCameraPos(playerid, 320.0, 50.0, 170.0);
SetPlayerCameraLookAt(playerid, 324.34, 54.122, 173.35);
}
else
{
SetPlayerPos(playerid, 123.4, 123.4, 123.4);
SendClientMessage(playerid, WHITE, "You have cancelled the CCTV menu, and was set back to where you last was.");
}
}
Re: Dialog msgbox type. -
MoroDan - 24.07.2011
Same minute MadeMan

.
PHP код:
case 2525:
{
if(!response)
{
SetPlayerPos(playerid, 123.4, 123.4, 123.4);
SendClientMessage(playerid, WHITE, "You have cancelled the CCTV menu, and was set back to where you last was.");
}
else
{
ShowPlayerDialog(playerid, 4568, DIALOG_STYLE_MSGBOX, "CCTV Camera 2", "Bone County Fire/Medic Department", "Next", "Cancel");
SetPlayerCameraPos(playerid, 320.0, 50.0, 170.0);
SetPlayerCameraLookAt(playerid, 324.34, 54.122, 173.35);
}
}
Re: Dialog msgbox type. -
Lee_Percox - 24.07.2011
Well with a message box there is no use for listitem. Just use if(!response) do something.. else do something else.
So button left == response button right == !response.
if(!response)
{
SendClientMessage(playerid, CHOOSE_COLOR, "You selected the right button");
return 1;
}
Then code under it would only be executed if the left button was pressed.
Re: Dialog msgbox type. -
iGetty - 24.07.2011
Thanks guys