AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved hud color for different player (https://forums.alliedmods.net/showthread.php?t=312679)

666 12-11-2018 14:54

hud color for different player
 
I need to send a hud message to each server player example: welcome to server.

Now what I want is for the hud to have a different color for each player

fysiks 12-11-2018 21:47

Re: hud color for different player
 
So, what is your question?

Alber9091 12-12-2018 08:10

Re: hud color for different player
 
Quote:

Originally Posted by fysiks (Post 2628474)
So, what is your question?

Welcome message on joining of server
With any random color to every other color who joined. (Not Same)

redivcram 12-12-2018 08:30

Re: hud color for different player
 
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.

666 12-12-2018 11:21

Re: hud color for different player
 
Quote:

Originally Posted by fysiks (Post 2628474)
So, what is your question?

my question is if I can take the ID of the players of the terrorist team example: if there are 3 terrorists take the individual id of each one of them to send them the individual message

redivcram 12-13-2018 09:21

Re: hud color for different player
 
Quote:

Originally Posted by 666 (Post 2628604)
my question is if I can take the ID of the players of the terrorist team example: if there are 3 terrorists take the individual id of each one of them to send them the individual message

You're not giving enough/proper information. What kind of message? How do they get the message? Do you type a command to the console? Does one client get the message or multiple? Give a better example.


All times are GMT -4. The time now is 14:42.

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