AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Motd Windows Help (https://forums.alliedmods.net/showthread.php?t=87145)

lahm 03-07-2009 12:04

Motd Windows Help
 
I'm looking for a plugin, which makes up a window motd with help when someone types "help (without " / ")

In another forum said to compile this ...


PHP Code:

#include <amxmodx>

#pragma dynamic 32678

public plugin_init()
{
    
register_clcmd("say help""CommandHelp")
    
register_clcmd("say ajuda""CommandHelp")
}

public 
CommandHelp(id)
{
    static 
iMOTDLoadediLen
    
static szMotd[4096]

    if(!
iMOTDLoaded)
    {
        new 
hFile fopen("\help_motd.html""r")
        if(!
hFile)
            
fclose(fopen("\help_motd.html""w"))
        else
        {
            while(!
feof(hFile))
            {
                
iLen += (fgets(hFileszMotd[iLen], charsmax(szMotd) - iLen))
            }
            
fclose(hFile)
        }
                
iMOTDLoaded true
    
}

    if(
szMotd[0])
    {
        
show_motd(idszMotd)
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE


but it didn’t work :|

Does anyone can help me? :]

iNspiratioN 03-07-2009 12:40

Re: Motd Windows Help
 
PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_clcmd("say help""CommandHelp")
    
register_clcmd("say ajuda""CommandHelp")
}

public 
CommandHelp(id)
{
    
show_motd(id,"help_motd.txt""Help menu")


create help_motd.txt in cstrike folder.

Hope that help's you. (This is the easyest way.I think...)

lahm 03-07-2009 13:00

Re: Motd Windows Help
 
Quote:

Originally Posted by iNspiratioN (Post 775836)
PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_clcmd("say help""CommandHelp")
    
register_clcmd("say ajuda""CommandHelp")
}

public 
CommandHelp(id)
{
    
show_motd(id,"help_motd.txt""Help menu")


create help_motd.txt in cstrike folder.

Hope that help's you. (This is the easyest way.I think...)

It works, tks. :)


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

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