I was wondering how I can make a config for my plugin. I want to be able to edit the names/types/links of items in the menu.
PHP Code:
#include <sourcemod>
#pragma semicolon 1
public Plugin:MyInfo =
{
name = "Donate",
author = "The Doctor!",
description = "Type !donate to open up a donate menu in-game",
version = "1.1",
url = "http://www.dcommunity.tk/"
}
public OnPluginStart()
{
RegConsoleCmd("sm_donate", Command_Donate, "Donate to the Community");
}
public Action:Command_Donate(client, args)
{
new Handle:menuhandle = CreatePanel();
SetPanelTitle( menuhandle, "Donate to the community" );
DrawPanelText( menuhandle, " \n" );
DrawPanelItem( menuhandle, "Perks/Info" );
DrawPanelItem( menuhandle, "Add The Doctor! (Owner)" );
DrawPanelItem( menuhandle, "Add Stormageddon (Admin)" );
DrawPanelItem( menuhandle, "Add Poop Mann (Admin)" );
SendPanelToClient( menuhandle, client, MenuCallBack, MENU_TIME_FOREVER );
CloseHandle( menuhandle );
}
public MenuCallBack( Handle:menuhandle, MenuAction:action, Client, Position )
{
if(action == MenuAction_Select)
{
switch( Position )
{
case 1:
{
ShowMOTDPanel(Client, "Perks/Info", "http://ibanezez12.site.nfoservers.com/images/vip2.png", MOTDPANEL_TYPE_URL);
}
case 2:
{
ShowMOTDPanel(Client, "Add The Doctor! (Owner)", "http://ibanezez12.site.nfoservers.com/images/vip2.png", MOTDPANEL_TYPE_URL);
}
case 3:
{
ShowMOTDPanel(Client, "Add Stormageddon (Admin)", "http://ibanezez12.site.nfoservers.com/images/vip2.png", MOTDPANEL_TYPE_URL);
}
case 4:
{
ShowMOTDPanel(Client, "Add Poop Mann (Admin)", "http://ibanezez12.site.nfoservers.com/images/vip2.png", MOTDPANEL_TYPE_URL);
}
}
}
}
__________________