31.08.2014, 23:19
Приветствую, вопрос таков, как можно узнать, открыто ли в текущий момент у игрока какое-либо диалоговое окно?
stock SPD(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
SetPVarInt(playerid, "DialogShown", 1);
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
SetPVarInt(playerid, "DialogShown", 0);
return true;
}
|
Лови:
Code:
stock SPD(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
SetPVarInt(playerid, "DialogShown", 1);
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
SetPVarInt(playerid, "DialogShown", 0);
return true;
}
|
|
Ну давайте перечитаем..."как можно узнать, открыто ли в текущий момент у игрока какое-либо диалоговое окно?" >>> "открыто ли какое-либо диалоговое окно" >>> КАКОЕ-ЛИБО!
Все так ведь... Так что этот способ работает так, как надо... К тому же, этот способ встречается в IpleoMax, и работает нормально... |
stock SPD(playerid, dialogid, style, caption[], info[], button1[], button2[])
{
ShowPlayerDialog(playerid, random(1000), style, caption, info, button1, button2);
SetPVarInt(playerid, "DialogShown", dialogid);
return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
dialogid = GetPVarInt(playerid, "DialogShown");
DeletePVar(playerid, "DialogShown");
return true;
}