Raised This Month: $23 Target: $400
 5% 

show rank on connection


Post New Thread Reply   
 
Thread Tools Display Modes
The RaiD.
Junior 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
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-30-2020 , 18:52   Re: show rank on connection
Reply With Quote #12

Quote:
Originally Posted by The RaiD. View Post
there is already a task of 0.5 but still the same problem
a 0.5 task in client_connect? the player probably didn't even load the map! Problem already solved.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
iceeedr is offline
Send a message via Skype™ to iceeedr
Reply


Thread Tools
Display Modes

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 03:48.


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