View Single Post
eat1k
Senior Member
Join Date: Apr 2018
Old 02-05-2019 , 14:58   Re: motd prints all playing players in rows
Reply With Quote #5

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

public plugin_init()
{
    
register_clcmd("say /hraci""player_skills");
}

public 
player_skills(id)
{
    new 
szMessage[MAX_MOTD_LENGTH], iLen;

    
iLen formatex(szMessagecharsmax(szMessage), "<HTML><head></head><body bgcolor=#000000><font color=#FFB000>");

    new 
iPlayers[MAX_PLAYERS], iPlayerCount;
    
get_players_ex(iPlayersiPlayerCountGetPlayers_ExcludeHLTV|GetPlayers_ExcludeBots);

    for(new 
iiPlayerCounti++)
        
iLen += formatex(szMessage[iLen], charsmax(szMessage) - iLen"%n<br>"iPlayers[i]);

    
show_motd(idszMessage"Info players");
    return 
PLUGIN_HANDLED;

__________________

Last edited by eat1k; 02-05-2019 at 15:33.
eat1k is offline