Skip to content

Commit

Permalink
Merge pull request #38 from enghausen/master
Browse files Browse the repository at this point in the history
Added check for CT alive with a Defuse Kit, when defusing without one
  • Loading branch information
B3none authored Feb 22, 2022
2 parents 95c8db4 + b19a370 commit 80ecf26
Show file tree
Hide file tree
Showing 11 changed files with 79 additions and 1 deletion.
20 changes: 19 additions & 1 deletion scripting/retakes_instadefuse.sp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Plugin myinfo =
name = "[Retakes] Instant Defuse",
author = "B3none",
description = "Allows a CT to instantly defuse the bomb when all Ts are dead and nothing can prevent the defusal.",
version = "1.4.0",
version = "1.5.0",
url = "https://github.com/b3none"
}

Expand Down Expand Up @@ -118,6 +118,24 @@ void AttemptInstantDefuse(int client, int exemptNade = 0)
g_bWouldMakeIt = (c4TimeLeft >= 10.0 && !hasDefuseKit) || (c4TimeLeft >= 5.0 && hasDefuseKit);
}

if (!g_bWouldMakeIt && (5.0 <= c4TimeLeft <= 10.0))
{
for (int i = 0; i <= MaxClients; i++)
{
if (IsValidClient(i) && IsPlayerAlive(i) && HasDefuseKit(i))
{
for (int j = 0; j <= MaxClients; j++)
{
if (IsValidClient(j))
{
PrintToChat(j, "%T", "TeammateHasDefuseKit", j, MESSAGE_PREFIX);
}
}
return;
}
}
}

if (GetConVarInt(hEndIfTooLate) == 1 && !g_bWouldMakeIt)
{
if (!OnInstandDefusePre(client, c4))
Expand Down
6 changes: 6 additions & 0 deletions translations/chi/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"chi" "{1} 距离炸弹爆炸还有 {2} 秒, 反恐精英胜利"
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"chi" "{1} 你没有时间!你的队友有一个化解套件!"
}
}
6 changes: 6 additions & 0 deletions translations/da/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"da" "{1} Der var {2} sekunder tilbage på bomben. CT vinder."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"da" "{1} Du har ikke tid! Din holdkammerat har et Defuse Kit!"
}
}
6 changes: 6 additions & 0 deletions translations/de/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"de" "{1} Es waren {2} Sekunden übrig bis zur Explosion. Die Antiterroreinheit gewinnt."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"de" "{1} Du hast keine Zeit! Dein Teamkollege hat ein Entschärfungskit!"
}
}
6 changes: 6 additions & 0 deletions translations/fr/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"fr" "{1} Il restait {2} secondes avant l'explosion. Les CT gagnents."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"fr" "{1} Vous n'avez pas le temps ! Votre coéquipier a un kit de désamorçage !"
}
}
6 changes: 6 additions & 0 deletions translations/hu/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"hu" "{1} {2} Másodperc volt hátra a bomba robbanásáig, a CT-k nyertek!"
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"hu" "{1} Nincs időd! Csapattársának van Defuse Kitje!"
}
}
6 changes: 6 additions & 0 deletions translations/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"en" "{1} There were {2} seconds left of the bomb. Counter Terrorists win."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"en" "{1} You have no time! Your teammate has a Defuse Kit!"
}
}
6 changes: 6 additions & 0 deletions translations/nl/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"nl" "{1} Er waren nog {2} seconden over op de bomb. CTs winnen."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"nl" "{1} Je hebt geen tijd! Je teamgenoot heeft een Defuse Kit!"
}
}
6 changes: 6 additions & 0 deletions translations/no/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"no" "{1} Det var {2} sekund igjen av bomben, CT vinner!"
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"no" "{1} Du har ikke tid! Lagkameraten din har et Defuse Kit!"
}
}
6 changes: 6 additions & 0 deletions translations/pt/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"pt" "{1} Havia {2} segundos até a bomba explodi. Os CT's ganharam a ronda."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"pt" "{1} Você não tem tempo! Seu companheiro de equipe tem um kit de desarme!"
}
}
6 changes: 6 additions & 0 deletions translations/ru/instadefuse.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"#format" "{1:s},{2:.1f}"
"ru" "{1} До взрыва оставалось {2} секунд. Спецназ победил."
}

"TeammateHasDefuseKit"
{
"#format" "{1:s}"
"ru" "{1} У тебя нет времени! У вашего товарища по команде есть комплект для обезвреживания!"
}
}

0 comments on commit 80ecf26

Please sign in to comment.