103 superspec_msg(
"",
"", it, sprintf(
"Player %s^7 just picked up ^3%s\n",
toucher.netname, item.netname), 1);
105 superspec_msg(
"",
"", it, sprintf(
"Player %s^7 just picked up ^3%s\n^8(%s^8)\n",
toucher.netname, item.netname, item.classname), 1);
113 if(((it.autospec_flags &
ASF_SHIELD) && item.invincible_finished) ||
114 ((it.autospec_flags &
ASF_STRENGTH) && item.strength_finished) ||
115 ((it.autospec_flags &
ASF_MEGA_AR) && item.itemdef == ITEM_ArmorMega) ||
116 ((it.autospec_flags &
ASF_MEGA_HP) && item.itemdef == ITEM_HealthMega) ||
117 ((it.autospec_flags &
ASF_FLAG_GRAB) && item.classname ==
"item_flag_team"))
125 superspec_msg(
"",
"", it, sprintf(
"^8Ignored that ^7%s^8 grabbed %s^8 since the observer_only option is ON\n",
toucher.netname, item.netname), 2);
130 superspec_msg(
"",
"", it, sprintf(
"^7Following %s^7 due to picking up %s\n",
toucher.netname, item.netname), 2);
143#define OPTIONINFO(flag, msg, test, text, long, short) \
144 msg = strcat(msg, ((flag & test) ? "^2[ON] ^7" : "^1[OFF] ^7"), text, " ^7(^3 ", long, "^7 | ^3", short, " ^7)\n")
156 if(
cmd_name ==
"superspec_itemfilter")
158 if(
argv(1) ==
"help")
160 superspec_msg(
"^3superspec_itemfilter help:\n\n\n",
"\n^3superspec_itemfilter help:\n", player,
161 "^7 superspec_itemfilter ^3\"item_classname1 item_classname2\"^7 only show thise items when ^2superspec ^3item_message^7 is on\n"
162 "^3 clear^7 Remove the filter (show all pickups)\n"
163 "^3 show ^7 Display current filter\n"
166 else if(
argv(1) ==
"clear")
168 if(player.superspec_itemfilter !=
"")
171 player.superspec_itemfilter =
"";
173 else if(
argv(1) ==
"show" ||
argv(1) ==
"")
175 if(player.superspec_itemfilter ==
"")
177 superspec_msg(
"^3superspec_itemfilter^7 is ^1not^7 set",
"\n^3superspec_itemfilter^7 is ^1not^7 set\n", player,
"", 1);
182 for(
int i = 0; i < l; ++i)
186 _msg =
strcat(_msg,
"\n");
188 superspec_msg(
"^3superspec_itemfilter is:\n\n\n",
"\n^3superspec_itemfilter is:\n", player, _msg, 1);
192 if(player.superspec_itemfilter !=
"")
205 int _bits = 0, _start = 1;
206 if(
argv(1) ==
"help")
208 superspec_msg(
"^2Available Super Spectate ^3options:\n\n\n",
"\n^2Available Super Spectate ^3options:\n", player,
209 "use cmd superspec [option] [on|off] to set options\n\n"
210 "^3 silent ^7(short^5 si^7) supresses ALL messages from superspectate.\n"
211 "^3 verbose ^7(short^5 ve^7) makes superspectate print some additional information.\n"
212 "^3 item_message ^7(short^5 im^7) makes superspectate print items that were picked up.\n"
213 "^7 Use cmd superspec_itemfilter \"item_class1 item_class2\" to set up a filter of what to show with ^3item_message.\n"
218 if(
argv(1) ==
"clear")
220 player.superspec_flags = 0;
224 for(
int i = _start; i <
cmd_argc; ++i)
227 if(s ==
"on" || s ==
"1")
229 player.superspec_flags |= _bits;
232 else if(s ==
"off" || s ==
"0")
235 player.superspec_flags &= ~_bits;
241 if(s ==
"silent" || s ==
"si") _bits |=
SSF_SILENT ;
242 if(s ==
"verbose" || s ==
"ve") _bits |=
SSF_VERBOSE;
243 if(s ==
"item_message" || s ==
"im") _bits |=
SSF_ITEMMSG;
251 OPTIONINFO(player.superspec_flags, _aspeco,
SSF_ITEMMSG,
"Item pickup messages",
"item_message",
"im");
253 superspec_msg(
"^3Current Super Spectate options are:\n\n\n\n\n",
"\n^3Current Super Spectate options are:\n", player, _aspeco, 1);
262 if(
argv(1) ==
"help")
264 superspec_msg(
"^2Available Auto Spectate ^3options:\n\n\n",
"\n^2Available Auto Spectate ^3options:\n", player,
265 "use cmd autospec [option] [on|off] to set options\n\n"
266 "^3 strength ^7(short^5 st^7) for automatic spectate on strength powerup\n"
267 "^3 shield ^7(short^5 sh^7) for automatic spectate on shield powerup\n"
268 "^3 mega_health ^7(short^5 mh^7) for automatic spectate on mega health\n"
269 "^3 mega_armor ^7(short^5 ma^7) for automatic spectate on mega armor\n"
270 "^3 flag_grab ^7(short^5 fg^7) for automatic spectate on CTF flag grab\n"
271 "^3 observer_only ^7(short^5 oo^7) for automatic spectate only if in observer mode\n"
272 "^3 show_what ^7(short^5 sw^7) to display what event triggered autospectate\n"
273 "^3 item_msg ^7(short^5 im^7) to autospec when item_message in superspectate is triggered\n"
274 "^3 followkiller ^7(short ^5fk^7) to autospec the killer/off\n"
275 "^3 all ^7(short ^5aa^7) to turn everything on/off\n"
280 int _bits = 0, _start = 1;
281 if(
argv(1) ==
"clear")
283 player.autospec_flags = 0;
287 for(
int i = _start; i <
cmd_argc; ++i)
290 if(s ==
"on" || s ==
"1")
292 player.autospec_flags |= _bits;
295 else if(s ==
"off" || s ==
"0")
298 player.autospec_flags &= ~_bits;
305 if(s ==
"shield" || s ==
"sh") _bits |=
ASF_SHIELD;
306 if(s ==
"mega_health" || s ==
"mh") _bits |=
ASF_MEGA_HP;
307 if(s ==
"mega_armor" || s ==
"ma") _bits |=
ASF_MEGA_AR;
310 if(s ==
"show_what" || s ==
"sw") _bits |=
ASF_SHOWWHAT;
311 if(s ==
"item_msg" || s ==
"im") _bits |=
ASF_SSIM;
313 if(s ==
"all" || s ==
"aa") _bits |=
ASF_ALL;
325 OPTIONINFO(player.autospec_flags, _aspeco,
ASF_SHOWWHAT,
"Show what item triggered spectate",
"show_what",
"sw");
326 OPTIONINFO(player.autospec_flags, _aspeco,
ASF_SSIM,
"Switch on superspec item message",
"item_msg",
"im");
329 superspec_msg(
"^3Current auto spectate options are:\n\n\n\n\n",
"\n^3Current auto spectate options are:\n", player, _aspeco, 1);
#define OPTIONINFO(flag, msg, test, text, long, short)