AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   TF2 Panel Help (https://forums.alliedmods.net/showthread.php?t=155092)

Nikey646 04-17-2011 12:35

TF2 Panel Help
 
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....

hleV 04-17-2011 12:49

Re: TF2 Panel Help
 
Ask in SourceMod section.

Arkshine 04-17-2011 13:10

Re: TF2 Panel Help
 
Moved to SourceMod scripting section.

Nikey646 04-17-2011 13:17

Re: TF2 Panel Help
 
Sorry, 2am, didnt notice the difference :P


All times are GMT -4. The time now is 03:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.