// done to both MSG_INFO and MSG_CENTER
if(substring(input, (strlen(input) - 1), 1) == "\n")
{
- print(sprintf(
+ printf(
strcat(
"^1TRAILING NEW LINE AT END OF NOTIFICATION: ",
"^7net_type = %s, net_name = %s, string = %s.\n"
notiftype,
notifname,
stringtype
- ));
+ );
notif_error = TRUE;
input = substring(input, 1, (strlen(input) - 1));
}
{
if(sel_num == NOTIF_MAX_ARGS)
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
"^7net_type = %s, net_name = %s, max args = %d.\n"
notiftype,
notifname,
NOTIF_MAX_ARGS
- ));
+ );
notif_error = TRUE;
break;
}
#undef ARG_CASE_ARG_CS_SV_HA
default:
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
"^7net_type = %s, net_name = %s, args arg = '%s'.\n"
notiftype,
notifname,
selected
- ));
+ );
notif_error = TRUE;
break;
}
{
if(sel_num == NOTIF_MAX_HUDARGS)
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
"^7net_type = %s, net_name = %s, max hudargs = %d.\n"
notiftype,
notifname,
NOTIF_MAX_HUDARGS
- ));
+ );
notif_error = TRUE;
break;
}
#undef ARG_CASE_ARG_CS_SV_HA
default:
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
"^7net_type = %s, net_name = %s, hudargs arg = '%s'.\n"
notiftype,
notifname,
selected
- ));
+ );
notif_error = TRUE;
break;
}
{
if(sel_num == NOTIF_MAX_DURCNT)
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
"^7net_type = %s, net_name = %s, max durcnt = %d.\n"
notiftype,
notifname,
NOTIF_MAX_DURCNT
- ));
+ );
notif_error = TRUE;
break;
}
if(ftos(stof(selected)) != "") { ++sel_num; }
else
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
"^7net_type = %s, net_name = %s, durcnt arg = '%s'.\n"
notiftype,
notifname,
selected
- ));
+ );
notif_error = TRUE;
}
break;
}
else
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH NO SOUND: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
}
}
else if((hudargs == "") && (durcnt ==""))
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: ",
"^7net_type = %s, net_name = %s, strnum = %d, flnum = %d\n"
namestring,
strnum,
flnum
- ));
+ );
notif_error = TRUE;
}
}
if(icon != "") { notif.nent_icon = strzone(icon); }
else
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS HUDARGS BUT NO ICON: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
}
else if(icon != "")
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS ICON BUT NO HUDARGS: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
else
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION HAS DURCNT BUT NO CPID: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
}
// Check to make sure a string was chosen
if(notif.nent_string == "")
{
- print(sprintf(
+ printf(
strcat(
"^1EMPTY NOTIFICATION: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
}
// Set MSG_MULTI string/float counts
if((anncename == NO_MSG) && (infoname == NO_MSG) && (centername == NO_MSG))
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH NO SUBCALLS: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
else
{
if((chtype == NO_MSG) || (optiona == NO_MSG) || (optionb == NO_MSG))
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION IS MISSING CHOICE PARAMS: ",
"^7net_type = %s, net_name = %s.\n"
),
typestring,
namestring
- ));
+ );
notif_error = TRUE;
}
else
default:
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH IMPROPER TYPE: ",
"^7net_type = %d, net_name = %s.\n"
),
typeid,
namestring
- ));
+ );
notif_error = TRUE;
break;
}
default:
{
- print(sprintf(
+ printf(
strcat(
"^1NOTIFICATION WITH IMPROPER TYPE: ",
"^7net_type = %d, net_name = %s.\n"
),
typeid,
namestring
- ));
+ );
notif_error = TRUE;
break;
}
if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
- "Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)"
+ "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
);
}
if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
- "Notification control cvar: 0 = off, 1 = print to console, "
+ "0 = off, 1 = print to console, "
"2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
);
}
if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
- "Notification control cvar: 0 = off, 1 = centerprint"
+ "0 = off, 1 = centerprint"
);
}
if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
- "Notification control cvar: 0 = off, 1 = trigger subcalls"
+ "Enable this multiple notification"
);
}
if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY_CHOICE(
- "Notification control cvar: 0 = off, 1 = trigger option A subcall, 2 = trigger option B subcall",
- "Notification control cvar: 0 = off, 1 = allowed in warmup mode, 2 = always allowed"
+ "Choice for this notification 0 = off, 1 = default message, 2 = verbose message",
+ "Allow choice for this notification 0 = off, 1 = only in warmup mode, 2 = always"
);
}
NOTIF_WRITE_HARDCODED(
"allow_chatboxprint", "1",
- "Allow notifications to be printed to chat box by setting notification cvar to 2 "
- "(You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)"
+ "Allow INFO notifications to be printed to chat box"
+ "0 = do not allow, "
+ "1 = allow only if allowed by individual notification_INFO* cvars, "
+ "2 = force all INFO notifications to be printed to the chatbox"
);
NOTIF_WRITE_HARDCODED(
void Local_Notification_HUD_Notify_Push(
string icon, string hudargs,
- string s1, string s2, string s3, string s4)
+ string s1, string s2, string s3, string s4,
+ float f1, float f2, float f3, float f4)
{
string selected;
float sel_num;
}
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
- "Local_Notification_HUD_Notify_Push('%s^7', '%s', %s, %s);\n",
+ "Local_Notification_HUD_Notify_Push('%s^7', '%s', %s, %s, %s);\n",
icon,
hudargs,
MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)),
+ sprintf("%d, %d, %d, %d", f1, f2, f3, f4),
MakeConsoleSafe(sprintf("'%s^7', '%s^7'", stof(arg_slot[0]), stof(arg_slot[1])))
));
#endif
Local_Notification_HUD_Notify_Push(
notif.nent_icon,
notif.nent_hudargs,
- s1, s2, s3, s4);
+ s1, s2, s3, s4,
+ f1, f2, f3, f4);
}
#endif
break;
#define RECURSE_FROM_CHOICE(ent,action) \
if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) \
{ \
- switch(ent.msg_choice_choices[net_name]) \
+ switch(ent.msg_choice_choices[net_name - 1]) \
{ \
case 1: found_choice = notif.nent_optiona; break; \
case 2: found_choice = notif.nent_optionb; break; \