AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Request Plugin] Steam ID Counter (https://forums.alliedmods.net/showthread.php?t=97357)

TazZ.amxx 07-15-2009 05:49

[Request Plugin] Steam ID Counter
 
Hi,

I am looking for a Plugin, that displays how often a player has joined my server.


I think its possible to create by counting/registering the Steam ID, or isnīt it?

Maybe you have an idea..


Greetings from GERMANY by TazZ.amxx

Arkshine 07-15-2009 06:38

Re: [Request Plugin] Steam ID Counter
 
Why don't you install Psychostats for example, you will get such stats about a player.

TazZ.amxx 07-15-2009 06:57

Re: [Request Plugin] Steam ID Counter
 
thx for the idea,

but with psychostats I will need a mySQL Database, or something like that.
This plugin is too overload for my idea.

TheRadiance 07-15-2009 07:47

Re: [Request Plugin] Steam ID Counter
 
Not tested, but should work (nvault module needed):
PHP Code:

#include <amxmodx>
#include <nvault>

new const g_name[] = "id_counter";

public 
plugin_init()
{
    
register_plugin("id_counter""1.0""TazZ.amxx");
    
register_clcmd("say""cmdHookSay");
}

public 
client_putinserver(id)
{
    new 
nvault_open(g_name);

    if (
v  == -1)
    {
        return;
    }

    new 
auth[32];
    new 
res[8];
    
get_user_authid(idauthsizeof (auth));
    
nvault_get(vauthressizeof (res));

    new 
num str_to_num(res);

    if (!
num)
    {
        
nvault_set(vauth"1");
    }
    else
    {
        
formatex(ressizeof (res), "%i"num++);
        
nvault_set(vauthres);
    }

    
nvault_close(v);
}

public 
cmdHookSay(id)
{
    new 
cmd[8];
    
read_args(cmdsizeof (cmd));
    
remove_quotes(cmd);

    if (
equal(cmd"/get"))
    {
        new 
nvault_open(g_name);

        if (
== -1)
        {
            return;
        }

        new 
auth[32];
        new 
res[8];
        
get_user_authid(idauthsizeof (auth));
        
nvault_get(vauthressizeof (res));
        
nvault_close(v);

        
client_print(idprint_chat"You joined this server %i time(s)."str_to_num(res));
    }



ConnorMcLeod 07-15-2009 07:50

Re: [Request Plugin] Steam ID Counter
 
Could be better to not count when a player joins 2 times on the same map.

TheRadiance 07-15-2009 08:14

Re: [Request Plugin] Steam ID Counter
 
I just don't know exactly what he wants :)

TazZ.amxx 07-15-2009 08:45

Re: [Request Plugin] Steam ID Counter
 
thx guys!

What I seek is:
I (admin) want to see, how often a player has joined my server (maybe the player has changed his name).

@TheRadiance:
Do you have created this code extra for me?
I have no scripting experience, but I think I understand a bit^^
In the line:
PHP Code:

lient_print(idprint_chat"You joined this server %i time(s)."str_to_num(res)); 

Is this message displayed to all player ingame, or only for the one who joins? Better is: all player can read this!

Will the plugin operating by counting the Steam ID?

What can I do with this code, now? Do I have to compile it?

TheRadiance 07-15-2009 08:59

Re: [Request Plugin] Steam ID Counter
 
Quote:

Originally Posted by TazZ.amxx (Post 872768)
thx guys!

What I seek is:
I (admin) want to see, how often a player has joined my server (maybe the player has changed his name).

@TheRadiance:
Do you have created this code extra for me?
I have no scripting experience, but I think I understand a bit^^
In the line:
PHP Code:

lient_print(idprint_chat"You joined this server %i time(s)."str_to_num(res)); 

Is this message displayed to all player ingame, or only for the one who joins? Better is: all player can read this!

Will the plugin operating by counting the Steam ID?

What can I do with this code, now? Do I have to compile it?

Give us know exactly which way of print you want (when player connects or disconnects, who will see this message etc...);

Quote:

Do you have created this code extra for me?
yeah

TazZ.amxx 07-15-2009 09:18

Re: [Request Plugin] Steam ID Counter
 
Requirements:

-displayed at connection
-displayed for all players ingame and to the one who joines
-position: at the bottom on left side. Not centered!
-colour of the word "NOOBY " and "12" should be in green
-make it possible to edit the text (called "string"?) for me, like itīs possible in the GHW Connect Messages-Plugin (see the first CVAR)

For Example:
Quote:

Player NOOBY played here: 12 times
the underlined word is recognized by the plugin.
(Is this right in the english language? Maybe correct the sentence)

Do you need other informations about my running plugins, or configs? Ask me, I will post them.

how can I thank you for the work?

TazZ.amxx 07-20-2009 08:55

Re: [Request Plugin] Steam ID Counter
 
are you still working? ^^


All times are GMT -4. The time now is 14:31.

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