Raised This Month: $51 Target: $400
 12% 

show rank on connection


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
The RaiD.
Member
Join Date: Jul 2019
Old 06-29-2020 , 05:30   Re: show rank on connection
Reply With Quote #11

Quote:
Originally Posted by Supremache View Post
Try This:
PHP Code:
#include <amxmodx>
#include <csstats>


public plugin_init() 
{
    
register_plugin("InfoMessage""1.0""MrAbdoO");
}

public 
client_putinserver(iPlayer)
{
    
set_task(8.0"go_info"iPlayer""0""0);
}

public 
go_info(id)
{
    new 
stats], body], szName32 ], szAuth32 ];
    new 
rank_pos get_user_statsidstatsbody )
    new 
rank_max get_statsnum( )
    
get_user_nameidszName31 )
    
get_user_authid(id szAuth 31)
    
ChatColor(0"!tPlayer !t%s !g(%s) !nhas connected to server. Rank is !g%d!nfrom !g%d!n."szNameszAuthrank_posrank_max);
    return 
0;
}

// Colour Chat
stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^x04"); // Green Color
    
replace_all(msg190"!n""^x01"); // Default Color
    
replace_all(msg190"!t""^x03"); // Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
    
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }

works thanks. and thanks to all

Last edited by The RaiD.; 06-29-2020 at 05:31.
The RaiD. is offline
 



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:53.


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