Ok, so me and my friend are up at 2am, hitting our brains to figure out how to make a mod, we just want a simple mod that can produce a menu or panel (as i found out reading the wiki) that shows the server rules....so basicly, this is the code i used, thinking, that if the map changer can read a text file, chaning that a lil and to make it use panels, it could produce the contents of the text file.....
Code:
new Handle:g_MapMenu = INVALID_HANDLE
public OnPluginStart()
{
RegConsoleCmd("Panel_Rules", Panel_Rules);
}
Handle:Buildrulepanel()
{
new Handle:file = OpenFile("rules.txt", "rt");
if (file == INVALID_HANDLE)
{
return INVALID_HANDLE;
}
new Handle:Panel = CreatePanel(Panel_Rules);
CloseHandle(file);
SetPanelTitle(Panel, "AussieDB Server Rules");
return Panel;
}
i dont have a server to test this on (yet, working on getting it).
but, i can just tell, coding in a new language at 2am anit ganna work out properly....so i was wondering if someone could help me out with the above code alil.....
what its MENT to do, is upon a player typing ''rules'' into chat, it'll then produce a panel with a small prargraph describing the server rules....