From aec2160e84fe30a18007667950a423726ff124f7 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Wed, 12 Sep 2007 23:37:00 +0000 Subject: [PATCH] added new reconnect client panel stock --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401419 --- plugins/include/halflife.inc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index cd4c8e5f..58e3b37a 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -45,7 +45,8 @@ enum DialogType DialogType_Msg = 0, /**< just an on screen message */ DialogType_Menu, /**< an options menu */ DialogType_Text, /**< a richtext dialog */ - DialogType_Entry /**< an entry box */ + DialogType_Entry, /**< an entry box */ + DialogType_AskConnect /**< ask the client to connect to a specified IP */ }; /** @@ -367,3 +368,20 @@ stock ShowMOTDPanel(client, const String:title[], const String:msg[], type=MOTDP ShowVGUIPanel(client, "info", Kv); CloseHandle(Kv); } + +/** + * Displays a panel asking the client to connect to a specified IP. + * + * @param client Client index. + * @param time Duration to hold the panel on the client's screen. + * @param ip Destionation IP. + * @noreturn + */ +stock DisplayAskConnectBox(client, Float:time, const String:ip[]) +{ + new Handle:Kv = CreateKeyValues("data"); + KvSetFloat(Kv, "time", time); + KvSetString(Kv, "title", ip); + CreateDialog(client, Kv, DialogType_AskConnect); + CloseHandle(Kv); +}