View Single Post
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-12-2018 , 08:30   Re: hud color for different player
Reply With Quote #4

PHP Code:
#include <amxmodx>

#define TASK_HUDMESSAGE 29272

new const g_szPluginName[] = "Colorful HUD Welcome Message";
new const 
g_szPluginVersion[] = "0.1";
new const 
g_szPluginAuthor[] = "redivcram";

public 
plugin_init()
    
register_plugin(g_szPluginNameg_szPluginVersiong_szPluginAuthor);

public 
client_putinserver(id)
{
    
// Wait after like 3 seconds after he joined (It's safer) then show the welcome message
    
set_task(3.0"HUDWelcomeMessage"id TASK_HUDMESSAGE);
}

public 
HUDWelcomeMessage(id)
{
    
id -= TASK_HUDMESSAGE;
    
    new 
random_num(0255);
    new 
random_num(0255);
    new 
random_num(0255);
    
    
set_hudmessage(rgb, -1.0, -1.0)
    
show_hudmessage(id"Welcome to the server!");
    
    return 
PLUGIN_HANDLED;

Not tested.
redivcram is offline