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

message color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Danielx931
Member
Join Date: Nov 2020
Old 12-13-2020 , 19:25   message color
Reply With Quote #1

Can anyone color this message for me please...i tried by my self ...buy yeah
No hate please...

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


#define ADVERTISING_TIME 155.0


stock const messages[][] = {

"* If you want to be part of our team take a look at the prices of the ranks by typing /prices"

}



public 
plugin_init() {
    
register_plugin("Rang prices","1.0","")
    
register_clcmd ("say /prices" "rang_prices_motd" , -1);
    
register_clcmd ("say_team /prices" "rang_prices_motd" , -1);
        
set_task(ADVERTISING_TIME"show_messages"___,"b");
}

public 
rang_prices_motd(idshow_motd(id,"/addons/amxmodx/configs/rang_prices_motd.html")

public 
show_messages()
{
new 
Buffer[256];
formatex(Buffersizeof Buffer 1"^x02%s"messages[random(sizeof messages)]);

new 
players[32], numid;
get_players(playersnum);

for(new 
num i++)
{
id players[i]

message_begin(MSG_ONEget_user_msgid("SayText"), _id);
write_byte(id);
write_string(Buffer);
message_end();
}

Danielx931 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-13-2020 , 21:08   Re: message color
Reply With Quote #2

Use an existing color chat plugin since most of those have been well tested. Or, upgrade to the beta release of AMX Mod X (1.9.x+) to get built-in color chat (client_print_color IIRC).
__________________
fysiks is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-14-2020 , 08:13   Re: message color
Reply With Quote #3

Code:
#include <cromchat> public show_messages() {     CC_SendMessage(0, "%s", messages[random(sizeof messages)]) }
__________________

Last edited by OciXCrom; 12-14-2020 at 08:13.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-14-2020 , 11:00   Re: message color
Reply With Quote #4

Despite being beta, It's stable and people should really consider migrating to it. 2k20 is almost over. :V
redivcram is offline
Danielx931
Member
Join Date: Nov 2020
Old 12-14-2020 , 11:45   Re: message color
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Code:
#include <cromchat> public show_messages() {     CC_SendMessage(0, "%s", messages[random(sizeof messages)]) }
Thanks for the help solved.

Last edited by Danielx931; 12-14-2020 at 11:46.
Danielx931 is offline
Reply



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 19:43.


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