added new reconnect client panel stock

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401419
This commit is contained in:
Borja Ferrer 2007-09-12 23:37:00 +00:00
parent 2920ba897c
commit aec2160e84

View File

@ -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);
}