diff --git a/scripting/include/ttt_const.inc b/scripting/include/ttt_const.inc index f23cd79..2e6edc6 100644 --- a/scripting/include/ttt_const.inc +++ b/scripting/include/ttt_const.inc @@ -187,7 +187,8 @@ enum _:BOMB_STATUS BS_PLANTED, BS_DEFUSED, BS_FAILED, - BS_BOMBED + BS_BOMBED, + BS_TIMED } enum _:PLAYER_LOYALTY diff --git a/scripting/ttt_dead_body.sma b/scripting/ttt_dead_body.sma index df0d79d..30dc108 100644 --- a/scripting/ttt_dead_body.sma +++ b/scripting/ttt_dead_body.sma @@ -198,8 +198,13 @@ public used_use(id, ent) return; new identified = ttt_get_playerdata(bodyowner, PD_IDENTIFIED); - if(ttt_get_playerstate(id) == PC_DETECTIVE || identified || g_iRoundSpecial[PC_DETECTIVE] == 0 || get_pcvar_num(cvar_allow_scan_anytime)) + if(identified || g_iRoundSpecial[PC_DETECTIVE] == 0 || get_pcvar_num(cvar_allow_scan_anytime) || ttt_get_playerstate(id) == PC_DETECTIVE) { + static playername[32], deadname[32]; + get_user_name(id, playername, charsmax(playername)); + get_user_name(bodyowner, deadname, charsmax(deadname)); + ttt_log_to_file(LOG_MISC, "%s (id: %d) started to inspect deadbody of %s (id: %d)", playername, id, deadname, bodyowner); + if(!identified) { new scanned = get_pcvar_num(cvar_credits_scanned); @@ -218,8 +223,6 @@ public used_use(id, ent) { new bonus_dead = get_pcvar_num(cvar_credits_det_bonusdead), bonus_trakill = get_pcvar_num(cvar_credits_det_trakill), credits; new killer = ttt_get_playerdata(bodyowner, PD_KILLEDBY); - static name[32]; - get_user_name(bodyowner, name, charsmax(name)); new num, i; static players[32]; @@ -231,12 +234,12 @@ public used_use(id, ent) { credits = ttt_get_playerdata(i, PD_CREDITS); ttt_set_playerdata(i, PD_CREDITS, credits + bonus_dead); - client_print_color(i, print_team_default, "%s %L", TTT_TAG, i, "TTT_AWARD3", bonus_dead, i, special_names[PC_TRAITOR], name); + client_print_color(i, print_team_default, "%s %L", TTT_TAG, i, "TTT_AWARD3", bonus_dead, i, special_names[PC_TRAITOR], deadname); if(killer == i) { ttt_set_playerdata(i, PD_CREDITS, credits + bonus_dead + bonus_trakill); - client_print_color(i, print_team_default, "%s %L", TTT_TAG, i, "TTT_AWARD2", bonus_trakill, i, special_names[PC_TRAITOR], name); + client_print_color(i, print_team_default, "%s %L", TTT_TAG, i, "TTT_AWARD2", bonus_trakill, i, special_names[PC_TRAITOR], deadname); } } } diff --git a/scripting/ttt_item_c4.sma b/scripting/ttt_item_c4.sma index 52dc45e..328c0da 100644 --- a/scripting/ttt_item_c4.sma +++ b/scripting/ttt_item_c4.sma @@ -298,10 +298,11 @@ public C4Timer(id) new time_min = get_pcvar_num(cvar_c4_mintime), time_max = get_pcvar_num(cvar_c4_maxtime); if(is_str_num(number)) { - new time_cur = str_to_num(number); + new time_cur = str_to_num(number), ret; if(time_min <= time_cur <= time_max) { g_iC4Time[id] = time_cur; + ExecuteForward(g_pBombStatusForward, ret, id, BS_TIMED, time_cur); client_print_color(id, print_team_default, "%s %L", TTT_TAG, id, "TTT_C42", time_cur); } else client_print_color(id, print_team_default, "%s %L", TTT_TAG, id, "TTT_C41", time_min, time_max); diff --git a/scripting/ttt_items_base.sma b/scripting/ttt_items_base.sma index dc7bcc5..af2656f 100644 --- a/scripting/ttt_items_base.sma +++ b/scripting/ttt_items_base.sma @@ -239,6 +239,10 @@ public _item_setup_add(plugin, params) data[SETUP_ITEMACTIVE] = get_param(6); get_string(7, data[SETUP_ITEMNAME], charsmax(data[SETUP_ITEMNAME])); + static name[32]; + get_user_name(data[SETUP_ITEMOWNER], name, charsmax(name)); + ttt_log_to_file(LOG_ITEM, "Item %s (id: %d) has been setup (ent: %d) by %s (id: %d)", data[SETUP_ITEMNAME], data[SETUP_ITEMID], data[SETUP_ITEMENT], name, data[SETUP_ITEMOWNER]); + ArrayPushArray(g_aSetup, data); g_iSetupItems = ArraySize(g_aSetup); diff --git a/scripting/ttt_logging.sma b/scripting/ttt_logging.sma index fb616b2..cedf420 100644 --- a/scripting/ttt_logging.sma +++ b/scripting/ttt_logging.sma @@ -87,12 +87,17 @@ public ttt_bomb_status(id, status, ent) "planted", "defused", "failed to defuse", - "exploded" + "exploded", + "changed time of" }; static name[32]; get_user_name(id, name, charsmax(name)); - _ttt_log_to_file(LOG_ITEM, "%s %s the C4", name, c4_status[status]); + if(status == BS_TIMED) { + _ttt_log_to_file(LOG_ITEM, "%s %s the C4 to: %d", name, c4_status[status], ent); + } else { + _ttt_log_to_file(LOG_ITEM, "%s %s the C4, ent: %d", name, c4_status[status], ent); + } } public Ham_TakeDamage_post(victim, inflictor, attacker, Float:damage, bits) diff --git a/scripting/ttt_show_infos.sma b/scripting/ttt_show_infos.sma index 8aecdd9..8a1339d 100644 --- a/scripting/ttt_show_infos.sma +++ b/scripting/ttt_show_infos.sma @@ -313,7 +313,7 @@ public show_motd_info(id, target) show_motd(id, msg, motdname); get_user_name(id, name[1], charsmax(name[])); - ttt_log_to_file(LOG_MISC, "%s inspected deadbody of %s", name[1], name[0]); + ttt_log_to_file(LOG_MISC, "%s (id: %d) inspected deadbody of %s (id: %d)", name[1], id, name[0], target); } public show_last_states(id)