Raised This Month: $ Target: $400
 0% 

Info Players v1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 03-24-2010 , 10:44   Re: Info Players v1.2
Reply With Quote #21

Quote:
Originally Posted by kanatzu View Post
I like how the code is small.



(Off-Topic) Just a tip, you should print the screenshot into the topic with IMG code. ("[/IMG]")

Why?
It is only cheating if you gain an unfair advantage that others don't have!
As anyone can use the info it is not cheating.

I like the idea, but i won't use it
__________________

Mordekay is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-24-2010 , 11:29   Re: Info Players v1.2
Reply With Quote #22

PHP Code:
public client_putinserver(id)
{
    
Count++

}
public 
client_disconnect(id)
{
    
Count--

This is a bad practice, use this instead:

PHP Code:
new szPlayers32 ], Count;
get_playersszPlayersCount"h" ); 
__________________
"There is no knowledge, that is not power"
fezh is offline
Shidla
Senior Member
Join Date: Nov 2008
Location: Russia, Moscow
Old 03-24-2010 , 12:09   Re: Info Players v1.2
Reply With Quote #23

Code:
[ru]
INFO_PLAYERS = Info Players
NICK = Ник
HEALTH = Жизни
ARMOR = Броня
MONEY = Деньги
TOTAL = Игроков всего
CodePage: UTF-8*BOM
__________________
[Russian Federation] NOT USSR
This is madness?! This is Shidla!
[ZP] Laser Mine 2.8.2 ML (NEW !!2013!!) | [ZP] New Win Msg 1.4
| [ZP] MutaDote 1.1
Shidla is offline
Send a message via ICQ to Shidla Send a message via Skype™ to Shidla
kanatzu
Veteran Member
Join Date: Oct 2007
Location: Sweden
Old 03-24-2010 , 16:23   Re: Info Players v1.2
Reply With Quote #24

Quote:
Originally Posted by Mordekay View Post

Why?
It is only cheating if you gain an unfair advantage that others don't have!
As anyone can use the info it is not cheating.

I like the idea, but i won't use it

I just think it's sad this may get abused for bad things, i like the plugin.

As laziboi72 said;

Quote:
Originally Posted by laziboi72 View Post
Very nice plugin
it would be better if you made cvar so that only spectators can use is or admin only flags

or better yet make if so you pay money everytime you use.

all these modifications should be simple
__________________




Quote:
Originally Posted by wrecked_ View Post
Stop saying words before I sodomize you with a cucumber.
kanatzu is offline
Send a message via MSN to kanatzu
Athix
Junior Member
Join Date: Mar 2010
Location: In your Head
Old 03-24-2010 , 21:15   Re: Info Players v1.2
Reply With Quote #25

Quote:
Originally Posted by papyrus_kn View Post
Code:
[bg]
INFO_PLAYERS = Informacia za igrachite
NICK = Nik
HEALTH = Kruv
ARMOR = Bronya
MONEY = Pari
TOTAL = Obshto igrachi
Thanks, updated.

@Asd'
Thanks too, updated.

@ laziboi72
Thanks, and updated.

@fezh
I'll see

@Shidla
I can't add this.
Athix is offline
laziboi72
Senior Member
Join Date: Aug 2009
Location: deathrun_temple
Old 03-24-2010 , 22:00   Re: Info Players v1.2
Reply With Quote #26

i edited the plugin so that you can toggle admin_only on/off (untested)

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new PLUGIN[] =  "Info Players"
new VERSION[] = "1.3"
new AUTHOR[] = "Athix edit by Laziboi72"

new iMaxPlayers;
new 
Count;
new 
adminonly;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_dictionary("InfoPlayers.txt")
    
    
register_clcmd("say","handle_say")

    
adminonly register_cvar("info_adminonly","1")
    
    
iMaxPlayers get_maxplayers()
}

public 
client_putinserver(id)
{
    
Count++
    
}
public 
client_disconnect(id)
{
    
Count--
}

public 
handle_say(id)
{    
    new 
admin get_pcvar_num(adminonly)

    if(
admin == && !is_user_admin(id))
    {
        
client_print(idprint_chat"%L"id"ONLY_ADMINS")
        return 
PLUGIN_HANDLED
    
}

    static 
Args[15]
    
read_args(Args14)
    
remove_quotes(Args)
    
    if(
Args[0] == '/' && containi(Args"info") != -1)
    {
        if((
is_user_admin(id) && admin == 1) || (admin == 0))
        {
            new 
motd[1501],len;
            
            
len format(motdsizeof motd 1,"<body bgcolor=#000000><font color=#fff000><pre>");
            
len += format(motd[len], (sizeof motd 1) - len,"<center><h2>---- %L ----</h2></center>^n^n"id"INFO_PLAYERS");
            
len += format(motd[len], (sizeof motd 1) - len,"%-22.22s %8s %7s %6s^n""%L"id"NICK""%L"id"HEALTH""%L"id"ARMOR""%L"id"MONEY");
            
            for(new 
1<= iMaxPlayersx++) 
            {
                if(
is_user_connected(x))
                {
                    new 
Name[33
                    
get_user_name(xName32
                    if(
containi (Name"<" ) != -)
                        
replace(Name32"<""" )    
                    
                    
len += format(motd[len], (sizeof motd 1) - len,"^n%-22.22s %5i %8i %7i"Nameget_user_health(x), get_user_armor(x), cs_get_user_money(id))
                    
                }
            }
            
            
len += format(motd[len], (sizeof motd 1) - len,"^n^n<font color=#fe9a2e><b><center>%L: %8i </center>"id"TOTAL"Count);
            
            new 
szMotdHeader[32]
            
formatex(szMotdHeader31"%L"id"INFO_PLAYERS");
            
show_motd(id,motdszMotdHeader);
        }
    }

Attached Files
File Type: sma Get Plugin or Get Source (InfoPlayersAdmin.sma - 282 views - 2.0 KB)
__________________
Taking a break from modding dunno when i will be back

FAIL, RIGHT HERE
laziboi72 is offline
Shidla
Senior Member
Join Date: Nov 2008
Location: Russia, Moscow
Old 03-25-2010 , 09:42   Re: Info Players v1.2
Reply With Quote #27

Why u can't? 0_o
I can!
Attached Files
File Type: txt InfoPlayers.txt (759 Bytes, 54 views)
__________________
[Russian Federation] NOT USSR
This is madness?! This is Shidla!
[ZP] Laser Mine 2.8.2 ML (NEW !!2013!!) | [ZP] New Win Msg 1.4
| [ZP] MutaDote 1.1

Last edited by Shidla; 03-25-2010 at 09:44.
Shidla is offline
Send a message via ICQ to Shidla Send a message via Skype™ to Shidla
Athix
Junior Member
Join Date: Mar 2010
Location: In your Head
Old 03-25-2010 , 16:00   Re: Info Players v1.2
Reply With Quote #28

Quote:
Originally Posted by laziboi72 View Post
i edited the plugin so that you can toggle admin_only on/off (untested)

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new PLUGIN[] =  "Info Players"
new VERSION[] = "1.3"
new AUTHOR[] = "Athix edit by Laziboi72"

new iMaxPlayers;
new 
Count;
new 
adminonly;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_dictionary("InfoPlayers.txt")
    
    
register_clcmd("say","handle_say")

    
adminonly register_cvar("info_adminonly","1")
    
    
iMaxPlayers get_maxplayers()
}

public 
client_putinserver(id)
{
    
Count++
    
}
public 
client_disconnect(id)
{
    
Count--
}

public 
handle_say(id)
{    
    new 
admin get_pcvar_num(adminonly)

    if(
admin == && !is_user_admin(id))
    {
        
client_print(idprint_chat"%L"id"ONLY_ADMINS")
        return 
PLUGIN_HANDLED
    
}

    static 
Args[15]
    
read_args(Args14)
    
remove_quotes(Args)
    
    if(
Args[0] == '/' && containi(Args"info") != -1)
    {
        if((
is_user_admin(id) && admin == 1) || (admin == 0))
        {
            new 
motd[1501],len;
            
            
len format(motdsizeof motd 1,"<body bgcolor=#000000><font color=#fff000><pre>");
            
len += format(motd[len], (sizeof motd 1) - len,"<center><h2>---- %L ----</h2></center>^n^n"id"INFO_PLAYERS");
            
len += format(motd[len], (sizeof motd 1) - len,"%-22.22s %8s %7s %6s^n""%L"id"NICK""%L"id"HEALTH""%L"id"ARMOR""%L"id"MONEY");
            
            for(new 
1<= iMaxPlayersx++) 
            {
                if(
is_user_connected(x))
                {
                    new 
Name[33
                    
get_user_name(xName32
                    if(
containi (Name"<" ) != -)
                        
replace(Name32"<""" )    
                    
                    
len += format(motd[len], (sizeof motd 1) - len,"^n%-22.22s %5i %8i %7i"Nameget_user_health(x), get_user_armor(x), cs_get_user_money(id))
                    
                }
            }
            
            
len += format(motd[len], (sizeof motd 1) - len,"^n^n<font color=#fe9a2e><b><center>%L: %8i </center>"id"TOTAL"Count);
            
            new 
szMotdHeader[32]
            
formatex(szMotdHeader31"%L"id"INFO_PLAYERS");
            
show_motd(id,motdszMotdHeader);
        }
    }

Thanks the same, but I did a little different


@Shidla
Thanks, updated =)

EDIT: @shidla, can you add ONLY_ADMINS in .txt?

Last edited by Athix; 03-25-2010 at 16:05.
Athix is offline
Old 03-25-2010, 23:21
laziboi72
This message has been deleted by laziboi72. Reason: nvm good work
papyrus_kn
Senior Member
Join Date: Feb 2009
Location: Bulgaria
Old 03-26-2010 , 03:48   Re: Info Players v1.2
Reply With Quote #29

Code:
[bg]
INFO_PLAYERS = Informacia za igrachite
NICK = Nik
HEALTH = Kruv
ARMOR = Bronya
MONEY = Pari
TOTAL = Obshto igrachi
ONLY_ADMINS = Samo admini mogat da polzvat tova.
Bulgarian updated
__________________
papyrus_kn is offline
Send a message via Skype™ to papyrus_kn
xD_1991
Senior Member
Join Date: Jul 2008
Location: Turkey/Istanbul
Old 03-26-2010 , 04:08   Re: Info Players v1.2
Reply With Quote #30

Turkish

Code:
[tr]
INFO_PLAYERS = Oyuncu Bilgileri
NICK = Lakap
HEALTH = Saglik
ARMOR = Zirh
MONEY = Para
TOTAL = Toplam Oyuncular
ONLY_ADMINS = Sadece yoneticiler bunu kullanabilir.
xD_1991 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 16:25.


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