added new reconnect client panel stock
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401419
This commit is contained in:
parent
2920ba897c
commit
aec2160e84
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user