AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get all plugin author info (https://forums.alliedmods.net/showthread.php?t=55908)

hlstriker 06-01-2007 19:11

Get all plugin author info
 
Is there a way to check the authors of all the plugins the server is running?

Example:
Scans plugins and finds the author names and displays them with client_print.

I need this so I can display all the plugins I created in an motd window.

v3x 06-01-2007 19:51

Re: Get all plugin author info
 
Something like this:
PHP Code:

#include <amxmodx>

public test()
{
    new 
string[1201], len;

    
len format(string1200"Plugins:^n^n");

    for(new 
0get_pluginsnum(); i++)
    {
        new 
filename[21];
        new 
name[21];
        new 
version[9];
        new 
author[21];
        new 
status[8];

        
get_plugin(ifilename20name20version8author20status7);

        
len += format(string, (1200 len), "%s - %s^n"nameauthor);
    }

    
show_motd(0string"Plugins");



Alka 06-02-2007 04:12

Re: Get all plugin author info
 
hum...not working..dunno why!? 0o

v3x 06-02-2007 11:12

Re: Get all plugin author info
 
Quote:

Originally Posted by Alka (Post 484770)
hum...not working..dunno why!? 0o

That's not the full code. You still need to do more coding to make it work.

stupok 06-02-2007 11:59

Re: Get all plugin author info
 
I think this should do it:

PHP Code:

#include <amxmodx>

new string[1201]

public 
plugin_cfg() // P34nut's suggestion
{
    new 
len;

    
len format(string1200"Plugins:^n^n");

    new 
filename[21];
    new 
name[21];
    new 
version[9];
    new 
author[21];
    new 
status[8];
    new 
pluginsnum get_pluginsnum()

    for(new 
0pluginsnumi++)
    {
        
get_plugin(ifilename20name20version8author20status7);

        
len += format(string, (1200 len), "%s - %s^n"nameauthor);
    }
}

public 
client_putinserver(id)
{
    
show_motd(0string"Plugins");



P34nut 06-02-2007 13:08

Re: Get all plugin author info
 
Use plugin_cfg instead of plugin_init


All times are GMT -4. The time now is 10:32.

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