Raised This Month: $ Target: $400
 0% 

Get all plugin author info


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-01-2007 , 19:11   Get all plugin author info
Reply With Quote #1

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.
hlstriker is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-01-2007 , 19:51   Re: Get all plugin author info
Reply With Quote #2

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");

__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-02-2007 , 04:12   Re: Get all plugin author info
Reply With Quote #3

hum...not working..dunno why!? 0o
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-02-2007 , 11:12   Re: Get all plugin author info
Reply With Quote #4

Quote:
Originally Posted by Alka View Post
hum...not working..dunno why!? 0o
That's not the full code. You still need to do more coding to make it work.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 06-02-2007 , 11:59   Re: Get all plugin author info
Reply With Quote #5

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");


Last edited by stupok; 06-02-2007 at 13:52.
stupok is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 06-02-2007 , 13:08   Re: Get all plugin author info
Reply With Quote #6

Use plugin_cfg instead of plugin_init
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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