Hi,
I'm trying to create a Panel which provides some information's.
It should have the AMX Style (Radio Style). But all I get is a Valve Style menu :/
its for the mod Empires and this mod supports the style, as it is described here:
http://www.empiresmod.com/forums/sho...nu+style+radio
It would be nice if anyone can tell me where I'm making a mistake with it.
Code:
public Plugin:myinfo =
{
name = "dummy",
author = "skulk_on_dope",
description = "dummy",
version = "0.0",
url = "http://www.sek2000.net/"
};
public OnPluginStart()
{
RegConsoleCmd("say", Command_Say);
RegConsoleCmd("say_team", Command_Say);
}
public Action:Command_Say(client, args)
{
decl String:text[192];
new startidx = 0;
if (GetCmdArgString(text, sizeof(text)) < 1)
{
return Plugin_Continue;
}
if (text[strlen(text)-1] == '"')
{
text[strlen(text)-1] = '\0';
startidx = 1;
}
if (strncmp(text[startidx], "say2", 4, false) == 0)
startidx += 4;
// Teamsay detection, need to remove Location (EMPIRES ONLY!!)
if((strncmp(text[startidx], "(", 1, false) == 0) && (strncmp(text[startidx + 3], ")", 1, false) == 0))
startidx += 5;
if (strcmp(text[startidx], ".lvl", false) == 0)
{
decl String:targetName[64];
GetClientName(client, targetName, sizeof(targetName));
new Handle:panelStyle = GetMenuStyleHandle(MenuStyle_Radio);
new Handle:panel = CreatePanel(panelStyle);
decl String:line[80];
SetPanelTitle(panel, "Ranking Stats" );
DrawPanelText(panel, " ")
DrawPanelItem(panel, "Basic Stats:")
Format(line,sizeof(line),"Information on %s(DB Name: %s)", targetName, "Dummy");
DrawPanelText(panel, line);
Format(line,sizeof(line),"Client has a total score of %d", 0);
DrawPanelText(panel, line);
Format(line,sizeof(line),"and reached rank %d(%s)", 0, "dummy");
DrawPanelText(panel, line);
DrawPanelText(panel, " ");
DrawPanelItem(panel, "Exit")
SendPanelToClient(panel, client, BlankMenuHandler, 20)
CloseHandle(panel)
return Plugin_Handled;
}
return Plugin_Continue;
}
public BlankMenuHandler(Handle:menu, MenuAction:action, param1, param2)
{
}