23.03.2012, 12:06
Maybe something like that:
This function could be put under OnDialogResponse for specific dialog ID (under specific dialog. If this sentence is incomprehensible, I wrote example below):
or for all dialogs (above all dialogs and under OnDialogResponse):
Example of using:
And now - if enable - moving dialog is enabled by the side of server, if is false - moving dialog is disabled? I think is possible, but if not, I suggest
Regards.
This function could be put under OnDialogResponse for specific dialog ID (under specific dialog. If this sentence is incomprehensible, I wrote example below):
pawn Код:
native ToggleMovingSpecificDialog(dialogid, enable); // this function can enable move dialog with specific ID
pawn Код:
native ToggleMovingAllDialogs(playerid, enable); // this function can enable moving all dialogs
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
ToggleMovingAllDialogs(playerid, enable); // if this function will be enabled, all dialogs can be moved and function under ShowPlayerDialog (ToggleMovingSpecificDialog(1, enable/disable)) will be ignored
// but! If ToggleMovingAllDialogs(playerid, enable/disable); has second parameter set to disable, all dialogs can be moved separately
ToggleMovingAllDialogs(playerid, disable);
if(dialogid == 1 && response)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Hello", "So... Hello?", "Okay", "Cancel");
// If "ToggleMovingAllDialogs(playerid, enable/disable)" has 2nd parameter to disable, function below could be work
ToggleMovingSpecificDialog(1, enable); // this dialog will be moved or if on above OnDialogResponse is "ToggleMovingAllDialogs(playerid, enable);", this function will be ignored
}
else if(dialogid == 2 && response)
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Hello 2", "Hello there", "Okay", "Cancel");
ToggleMovingSpecificDialog(2, disable); // this dialog won't be moved or if on above OnDialogResponse is "ToggleMovingAllDialogs(playerid, enable);", this function will be ignored
}
return 0;
}
pawn Код:
native MoveTextDrawByMouse(textdraw);