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

Solved hud color for different player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
666
Senior Member
Join Date: Mar 2015
Old 12-11-2018 , 14:54   hud color for different player
Reply With Quote #1

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

Last edited by 666; 12-13-2018 at 16:13.
666 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-11-2018 , 21:47   Re: hud color for different player
Reply With Quote #2

So, what is your question?
__________________
fysiks is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 12-12-2018 , 08:10   Re: hud color for different player
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
So, what is your question?
Welcome message on joining of server
With any random color to every other color who joined. (Not Same)
Alber9091 is offline
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
666
Senior Member
Join Date: Mar 2015
Old 12-12-2018 , 11:21   Re: hud color for different player
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
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
666 is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-13-2018 , 09:21   Re: hud color for different player
Reply With Quote #6

Quote:
Originally Posted by 666 View Post
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.
redivcram is offline
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 07:32.


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