public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 200)//our dialog!
{
if(response)// They pressed the first button.
{
switch(listitem)
{
case 0:// The first item listed
{
SetPlayerCameraPos(playerid,-2783.7910,-359.3125,27.1710);
SetPlayerCameraLookAt(playerid,-2770.6438,-305.3811,7.0391,CAMERA_CUT);
}
case 1: // The second item listed
{
SetPlayerCameraPos(playerid,-2681.1904,-280.9120,27.1677);
SetPlayerCameraLookAt(playerid,-2681.0308,-258.1010,7.0489,CAMERA_CUT);
}
case 2: // The third item listed
{
SetPlayerCameraPos(playerid,-2788.5583,-399.1039,27.1829);
SetPlayerCameraLookAt(playerid,-2802.2390,-474.2502,7.1875,CAMERA_CUT);
}
}
return 1;
}
if(!response)
{
ShowPlayerDialog(playerid,-1,-1,"","","","");
return 1;
}
}
return 0;
}
filterscripts your_dialog_script[put here] admin_system and other shiz
No no.The dialog shows up but when I select a option but nothing happens and the dialog closes.
|
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/cctv", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 200, DIALOG_STYLE_LIST, "What is it that you want?", "CCTV [1]\nCCTV [2]\nCCTV [3]", "View", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 200)//our dialog!
{
if(response)// They pressed the first button.
{
switch(listitem)
{
case 0:// The first item listed
{
SetPlayerCameraPos(playerid,-2783.7910,-359.3125,27.1710);
SetPlayerCameraLookAt(playerid,-2770.6438,-305.3811,7.0391,CAMERA_CUT);
}
case 1: // The second item listed
{
SetPlayerCameraPos(playerid,-2681.1904,-280.9120,27.1677);
SetPlayerCameraLookAt(playerid,-2681.0308,-258.1010,7.0489,CAMERA_CUT);
}
case 2: // The third item listed
{
SetPlayerCameraPos(playerid,-2788.5583,-399.1039,27.1829);
SetPlayerCameraLookAt(playerid,-2802.2390,-474.2502,7.1875,CAMERA_CUT);
}
}
}
if(!response)
{
ShowPlayerDialog(playerid,-1,-1,"","","","");
return 1;
}
}
return 0;
}