3 void sv_notice_to(entity _to, string _notice, float _howlong, float _modal)
\r
6 WriteByte(MSG_ONE, SVC_TEMPENTITY);
7 WriteByte(MSG_ONE, TE_CSQC_SVNOTICE);
8 WriteString(MSG_ONE, _notice);
\r
9 WriteLong(MSG_ONE, _howlong);
\r
10 WriteByte(MSG_ONE, _modal);
\r
13 void sv_notice_toall(string _notice, float _howlong, float _modal)
\r
16 FOR_EACH_REALCLIENT(_head)
\r
17 sv_notice_to(_head, _notice, _howlong, _modal);
\r
27 void cl_notice_read()
\r
33 _notice.classname = "sv_notice";
\r
34 _notice.netname = strzone(ReadString());
\r
35 _notice.alpha = ReadLong() + time;
\r
36 _notice.skin = ReadByte();
\r
39 float cl_notice_run()
\r
45 _notes = findchain(classname, "sv_notice");
\r
53 v2_x = vid_conwidth - (2 * M1);
\r
54 v2_y = vid_conheight - (2 * M1);
\r
56 drawfill(v1, v2, '0 0 0', 0.5, DRAWFLAG_NORMAL);
\r
57 v1 = '1 1 0' * (M1 + M2);
\r
58 v2_x = vid_conwidth - (2 * (M1 + M2));
\r
59 v2_y = vid_conheight - (2 * (M1 + M2));
\r
60 drawfill(v1, v2, '0.5 0.5 0.5', 0.5, DRAWFLAG_NORMAL);
\r
61 v3 = v1 + '10 10 0';
\r
63 #define OUT(s,z) drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3_y += z + 4
\r
65 OUT("^1Server notices:", 32);
\r
67 //drawcolorcodedstring(v1 + '5 5 0', "^1Server notices:", '32 32 0', 1, DRAWFLAG_NORMAL);
\r
71 _notice = sprintf("^7%s (^3%d sec left)", _notes.netname , rint(_notes.alpha - time));
\r
77 if(_notes.alpha <= time)
\r
79 _notes.think = SUB_Remove;
\r
80 _notes.nextthink = time;
\r
83 _notes = _notes.chain;
\r