Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › General › Requests for DoD Plugins › Text chat Plugin
11 posts, 3 people · 5,968 views Thread Rating: ★★★★★
closedText chat Plugin
Started by Ba5ic on 11-23-2006, 07:24 AM
Ba5ic
started this thread
Posts: 181
Threads: 26
Joined: Nov 2005
11-23-2006, 07:24 AM #1

HirnrnI'm looking for a plugin that periodically ( say every 20 mins ) displays a message? example:rnrn[admin] We are recruiting , please visit www.mysite.com etc. For every player to see.rnrnI have hud / scrolling messages setup but i'm looking for simething to be displayed in the player chat field?.rnrnI have binds setup to do this but i want a random message when there are no members/ admins on.rnrnI hope this makes sense and would appreciate any guidance.rnrnThanks!

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
11-23-2006, 02:22 PM #2
Hin nI'm looking for a plugin that periodically ( say every 20 mins ) displays a message? example:n n[admin] We are recruiting , please visit www.mysite.com etc. For every player to see.n nI have hud / scrolling messages setup but i'm looking for simething to be displayed in the player chat field?.n nI have binds setup to do this but i want a random message when there are no members/ admins on.n nI hope this makes sense and would appreciate any guidance.n nThanks!
n nWould not be hard to do at all... give it a day or two for a follow-up response..

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
11-23-2006, 08:37 PM #3

i believe theres a few plugins that do this on the amxmodx.org forumsnnlike one plugin called like 'task scheduler' or something will let you do any commands including chat

Ba5ic
started this thread
Posts: 181
Threads: 26
Joined: Nov 2005
11-24-2006, 05:33 AM #4
i believe theres a few plugins that do this on the amxmodx.org forumsrnrnlike one plugin called like 'task scheduler' or something will let you do any commands including chat
rnrnrnHi DiamondrnrnThanks for the pointer , it's installed and working fine BUT is there a way i can remove the server name from the start of the message? as it stands it quite long windedrnrnserver name> message etc blah blah blah?.rnrnThanks

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
11-24-2006, 09:00 AM #5
Hi Diamondn nThanks for the pointer , it's installed and working fine BUT is there a way i can remove the server name from the start of the message? as it stands it quite long windedn nserver name> message etc blah blah blah?.n nThanks
npost link to code....

Ba5ic
started this thread
Posts: 181
Threads: 26
Joined: Nov 2005
11-24-2006, 09:10 AM #6
|= TatsuSaisei;2372']post link to code....
rnrnrn/* AMX Mod script. (Nov 10th, 2002)rn*rn* Task Scheduler 0.2rn* by JustinHoMirn*rn* amx_task time "task" flagsrn* flags:rn* m - time is in minutesrn* s - time is in secondsrn* r - repeat taskrn* t - specific timern*rn*/rnrn#include <amxmodx>rnrnnew task_cmds[32][108]rnnew task_times[32][16]rnnew numtasks = 0rnrnpublic load_task()rn{rn if (read_argc() < 4) {rn server_print("[AMX] Usage: amx_task < time > ^"command^" < flags >")rn return PLUGIN_HANDLEDrn }rnrn new args[128]rn read_args(args,128)rn new clock[6], cmd[108], flags[5]rnrn parse(args,clock,6,cmd,108,flags,5)rn new Float:time_f = floatstr(clock)rnrn new flag[2] = ""rn if (contain(flags,"r") != -1)rn flag="b"rn if (contain(flags,"m") != -1)rn time_f = time_f * 60rnrn if (contain(flags,"t") != -1)rn {rn copy(task_cmds[numtasks],108,cmd)rn copy(task_times[numtasks],6,clock)rn numtasks++rn return PLUGIN_HANDLEDrn }rnrn set_task(time_f,"run_task",0,cmd,108,flag)rnrn return PLUGIN_CONTINUErn}rnrnpublic run_task(cmd[])rn{rn server_cmd(cmd)rn return PLUGIN_HANDLEDrn}rnrnpublic check_time()rn{rn new curtime[16]rn get_time("%H:%M",curtime,16)rnrn for(new i=0; i<numtasks; i++)rn if(equal(curtime,task_times[i]))rn server_cmd(task_cmds[i])rnrn return PLUGIN_CONTINUErn}rnrnpublic plugin_init()rn{rn register_plugin("Task Scheduler","0.2","JustinHoMi")rn register_srvcmd("amx_task","load_task")rn set_task(60.0,"check_time",1,"",0,"b")rn return PLUGIN_CONTINUErn}

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
11-24-2006, 09:17 AM #7

you know what it is... your amxx is reporting who executes a command... nothing in that code controls that...n nin amxx.cfg change the following...n n

 n// Show admins activityn// 0 - disabledn// 1 - show without admin namen// 2 - show with namenamx_show_activity 0n
n notherwise no, you can not "remove" that by editing the code you provided...

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
11-24-2006, 09:39 AM #8

Try this... simple plugin...n n

 n#include <amxmodx>n#define PLUGIN "Simple Auto Text"n#define VERSION "76.0"n#define AUTHOR "TatsuSaisei"nnew message, msg_time, msg_wherenpublic plugin_init()n{n register_plugin(PLUGIN, VERSION, AUTHOR)n message = register_cvar("auto_message", "64.182.164.36:27016 ~ Home of the Damage Mod by: =|[76AD]|= TatsuSaisei ~ Questions, Comments, Fears welcome at forum.76AD.com")//the message to displayn msg_time = register_cvar("auto_msg_time", "180")//amount of time in seconds between each showingn msg_where = register_cvar("auto_msg_where", "1")//0 = center 1 = lower leftn set_task(get_pcvar_float(msg_time),"chat_something",1,"",0,"b")n return PLUGIN_CONTINUEn}npublic chat_something()n{n new msg[256]n get_pcvar_string(message, msg, 256)n if(get_pcvar_num(msg_where) == 0)n {n  client_print(0, print_center, msg)n }n else if(get_pcvar_num(msg_where) == 1)n {n  client_print(0, print_chat, msg)n }n return PLUGIN_CONTINUE n}n
Ba5ic
started this thread
Posts: 181
Threads: 26
Joined: Nov 2005
11-24-2006, 02:03 PM #9

Thanks TatsuSaiseirnrnIt works fine , however is there a way to make it display like a player chat rather than white text in the bottom centre of the screen?rnrnThank You

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
11-24-2006, 08:00 PM #10

setting the cvar: auto_msg_where to "1" should make it show up down in the chat area

Ba5ic
started this thread
Posts: 181
Threads: 26
Joined: Nov 2005
11-27-2006, 04:24 PM #11
|= TatsuSaisei;2376']Try this... simple plugin...rn rn
 rn#include <amxmodx>rn#define PLUGIN "Simple Auto Text"rn#define VERSION "76.0"rn#define AUTHOR "TatsuSaisei"rnnew message, msg_time, msg_wherernpublic plugin_init()rn{rn register_plugin(PLUGIN, VERSION, AUTHOR)rn message = register_cvar("auto_message", "64.182.164.36:27016 ~ Home of the Damage Mod by: =|[76AD]|= TatsuSaisei ~ Questions, Comments, Fears welcome at forum.76AD.com")//the message to displayrn msg_time = register_cvar("auto_msg_time", "180")//amount of time in seconds between each showingrn msg_where = register_cvar("auto_msg_where", "1")//0 = center 1 = lower leftrn set_task(get_pcvar_float(msg_time),"chat_something",1,"",0,"b")rn return PLUGIN_CONTINUErn}rnpublic chat_something()rn{rn new msg[256]rn get_pcvar_string(message, msg, 256)rn if(get_pcvar_num(msg_where) == 0)rn {rn  client_print(0, print_center, msg)rn }rn else if(get_pcvar_num(msg_where) == 1)rn {rn  client_print(0, print_chat, msg)rn }rn return PLUGIN_CONTINUE rn}rn
rnrnWorked fine :)rnrnThanks

Archive › Old Forum Threads › General › Requests for DoD Plugins › Text chat Plugin
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC