[L4D(2)] AFK and Join Team Commands Improved Version (2023/5/22 )
Add more commands to let the player spectate and join team. (!afk, !survivors, !infected, etc.), but no changing team abuse.
-New Feature-
Convert All codes to new syntax.
Translation support.
Update L4D2 "The Last Stand" gamedata. Credit to Lux's work
Add more commands to change team.
Add some limits to prevent players from changing team abuse. (see detail below)
Player can go idle even if he is alone in server.
Blocks player from going idle with 'esc->take a break'
Blocks player from switching team by choosing team menu in versus.
[L4D(2)] AFK and Join Team Commands Improved Version 3.2 (2020/10/1)
Add more commands to let the player spectate and join team. (!afk, !survivors, !infected, etc.), but no changing team abuse.
-New Feature-
Convert All codes to new syntax.
Translation support.
Update L4D2 "The Last Stand" gamedata. Credit to Lux's work
Add more commands to change team.
Add some limits to prevent players from changing team abuse. (see detail below)
Player can go idle even if he is alone in server.
Blocks player from going idle with 'esc->take a break'
Blocks player from switching team by choosing team menu in versus.
Allow alive survivor player suicides.
Adm can force player to swap team.
-Detail-
Spoiler
You can't go idle or use command to switch team if you are in one of below situation
You startle witch or witch attacks you.
You are capped by special infected.
You are a dead survivor.
Player can switch team until players have left start safe area for at least X seconds. (set time by convar below)
Cold Down Time in seconds a player can not change team again after he switches team.
Cold Down Time in seconds a player can not change team after he ignites molotov, gas can, firework crate or barrel fuel.
Cold Down Time in seconds a player can not change team after he throws molotov, pipe bomb or boomer juice.
New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
Updating gamedata:
New signature have been added: redownload and replace gamedata/l4d_afk_commands.txt
-Convar-
Spoiler
cfg\sourcemod\l4d_afk_commands.cfg
PHP Code:
// Cold Down Time in seconds a player can not change team again after he switches team. (0=off)
l4d_afk_commands_changeteam_cooltime_block "10.0"
// If 1, Dead Survivor player can not switch team.
l4d_afk_commands_deadplayer_block "1"
// If 1, Player can switch team until players have left start safe area for at least x seconds (0=off).
l4d_afk_commands_during_game_seconds_block "0"
// Cold Down Time in seconds a player can not change team after he ignites molotov, gas can, firework crate or barrel fuel. (0=off).
l4d_afk_commands_igniteprop_cooltime_block "15.0"
// Players with these flags have immune to all 'block' limit (Empty = Everyone, -1: Nobody)
l4d_afk_commands_immue_block_flag "z"
// Players with these flags have access to use command to infected team. (Empty = Everyone, -1: Nobody)
l4d_afk_commands_infected_access_flag ""
// If 1, Player can not change team when he is capped by special infected.
l4d_afk_commands_infected_attack_block "1"
// If 1, Block player from using 'jointeam' command in console. (This also blocks player from switching team by choosing team menu)
l4d_afk_commands_pressM_block "1"
// Players with these flags have access to use command to spectator team. (Empty = Everyone, -1: Nobody)
l4d_afk_commands_spec_access_flag ""
// If 1, Allow alive survivor player suicides by using '!zs'.
l4d_afk_commands_suicide_allow "1"
// Players with these flags have access to use command to survivor team. (Empty = Everyone, -1: Nobody)
l4d_afk_commands_survivor_access_flag ""
// If 1, Block player from using 'go_away_from_keyboard' command in console. (This also blocks player from going idle with 'esc->take a break')
l4d_afk_commands_takeabreak_block "1"
// If 1, Block player from using 'sb_takecontrol' command in console.
l4d_afk_commands_takecontrol_block "1"
// Cold Down Time in seconds a player can not change team after he throws molotov, pipe bomb or boomer juice. (0=off).
l4d_afk_commands_throwable_cooltime_block "10.0"
// If 1, Player can not change team when he startle witch or being attacked by witch.
l4d_afk_commands_witch_attack_block "1"
I did a test giving a reload command for the plugin (l4dinfectedbots), and it failed to load. But when I removed the LUX plugin, it loaded again.
I ask you if I need to use another plugin besides the one in the post [L4D (2)] AFK and Join Team Commands Improved Version 3.2 ???
Do I need to use this too: [L4D1 & L4D2] Survivor_AFK_Fix [Left 4 Fix]?
Because the two do not work well together, as the LUX plugin causes conflict with l4dinfectedbots.
[L4D(2)] AFK and Join Team Commands Improved Version 3.4 (2020/11/11)
Add more commands to let the player spectate and join team. (!afk, !survivors, !infected, etc.), but no changing team abuse.
-New Feature-
Convert All codes to new syntax.
Translation support.
Update L4D2 "The Last Stand" gamedata. Credit to Lux's work
Add more commands to change team.
Add some limits to prevent players from changing team abuse. (see detail below)
Player can go idle even if he is alone in server.
Blocks player from going idle with 'esc->take a break'
Blocks player from switching team by choosing team menu in versus.
Allow alive survivor player suicides.
Adm can force player to swap team.
-Detail-
Spoiler
You can't go idle or use command to switch team if you are in one of below situation
You startle witch or witch attacks you.
You are capped by special infected.
You are a dead survivor.
Player can switch team until players have left start safe area for at least X seconds. (set time by convar below)
Cold Down Time in seconds a player can not change team again after he switches team.
Cold Down Time in seconds a player can not change team after he ignites molotov, gas can, firework crate or barrel fuel.
Cold Down Time in seconds a player can not change team after he throws molotov, pipe bomb or boomer juice.
New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
Updating gamedata:
New signature have been added: redownload and replace gamedata/l4d_afk_commands.txt
Updating translation:
Spoiler
English by HarryPotter
Traditional Chinese by HarryPotter
Simplified Chinese by Target
Hungarian by KasperH
-Convar-
Spoiler
cfg\sourcemod\l4d_afk_commands.cfg
PHP Code:
// Cold Down Time in seconds a player can not change team again after he switches team. (0=off) l4d_afk_commands_changeteam_cooltime_block "10.0"
// If 1, Dead Survivor player can not switch team. l4d_afk_commands_deadplayer_block "1"
// Player can switch team until players have left start safe area for at least x seconds (0=off). l4d_afk_commands_during_game_seconds_block "0"
// Cold Down Time in seconds a player can not change team after he ignites molotov, gas can, firework crate or barrel fuel. (0=off). l4d_afk_commands_igniteprop_cooltime_block "15.0"
// Players with these flags have immune to all 'block' limit (Empty = Everyone, -1: Nobody) l4d_afk_commands_immue_block_flag "z"
// Players with these flags have access to use command to infected team. (Empty = Everyone, -1: Nobody) l4d_afk_commands_infected_access_flag ""
// If 1, Player can not change team when he is capped by special infected. l4d_afk_commands_infected_attack_block "1"
// If 1, Block player from using 'jointeam' command in console. (This also blocks player from switching team by choosing team menu) l4d_afk_commands_pressM_block "1"
// Players with these flags have access to use command to spectator team. (Empty = Everyone, -1: Nobody) l4d_afk_commands_spec_access_flag ""
// If 1, Allow alive survivor player suicides by using '!zs'. l4d_afk_commands_suicide_allow "1"
// Players with these flags have access to use command to survivor team. (Empty = Everyone, -1: Nobody) l4d_afk_commands_survivor_access_flag ""
// If 1, Block player from using 'go_away_from_keyboard' command in console. (This also blocks player from going idle with 'esc->take a break') l4d_afk_commands_takeabreak_block "1"
// If 1, Block player from using 'sb_takecontrol' command in console. l4d_afk_commands_takecontrol_block "1"
// Cold Down Time in seconds a player can not change team after he throws molotov, pipe bomb or boomer juice. (0=off). l4d_afk_commands_throwable_cooltime_block "10.0"
// If 1, Player can not change team when he startle witch or being attacked by witch. l4d_afk_commands_witch_attack_block "1"
It will make more sense to block switch team when survivors are still in the saferoom, because this is at this moment that people are taking the place of slow loaders, please add it with some sort of timer liek for example if after 20 seconds in saferoom players can switch team.
Also i translated sentences to french langage, except "suicide" ones because i removed it for myself.
Code:
"Phrases"
{
"Usage: sm_swapto"
{
"en" "Usage: sm_swapto <player1> [player2] ... [playerN] <teamnum> - swap all listed players to team <teamnum> (1: spec, 2: survivor, or 3: infected)"
"fr" "Utilisation: sm_swapto <player1> [player2] ... [playerN] <teamnum> - change tous les joueurs listés <teamnum> (1: spec, 2: survivants, ou 3: infectés)"
}
"Invalid team Number"
{
"#format" "{1:s}"
"en" "Invalid team {1} specified, needs to be 1, 2, or 3."
"fr" "Equipe invalide {1} spécifiée, doit etre 1, 2, ou 3."
}
"ADM Swap Player Team"
{
"en" "%N(ADM): %N has been swapped to the %s team."
"fr" "%N(ADM): %N a changé d'équipe avec %s."
}
"Idle"
{
"en" "You are already idle."
"fr" "Vous etes déjà infactif."
}
"You don't have access to change team to spectator"
{
"en" "You don't have access to change team to Spectator"
"fr" "Vous n'avez pas l'autorisation d'etre spectateur."
}
"You are already in survivor team."
{
"en" "You are already in survivor team."
"fr" "Vous etes déjà dans l'équipe des survivants."
}
"You are in idle, Press Left Mouse to play"
{
"en" "You are in idle mode, press left mouse to play"
"fr" "Vous êtes inactif, appuez sur le bouton gauche de la souris pour jouer."
}
"You don't have access to change team to survivor"
{
"en" "You don't have access to change team."
"fr" "Vous n'avez pas l'autorisation de changer d'équipe."
}
"Survivor team is full now."
{
"en" "Survivor team is full now."
"fr" "L'équipe des survivants est déjà au complet."
}
"You are already in infected team."
{
"en" "You are already in infected team."
"fr" "Vous etes déjà dans l'équipe des infectés."
}
"You don't have access to change team to Infected"
{
"en" "You don't have access to change team."
"fr" "Vous n'avez pas l'autorisation de changer d'équipe."
}
"Infected team is full now."
{
"en" "Infected team is full now."
"fr" "L'équipe des infectés est déjà au complet."
}
"This function has been blocked!"
{
"en" "This function has been blocked."
"fr" "La fonctionnalité a été bloquée."
}
"Infected can't go idle"
{
"en" "Infected can not AFK..."
"fr" "Les infectés ne peuvent pas s'absenter..."
}
"Can not change team after ignite"
{
"en" "Can not change team for a while after ignite fire or barrel fuel."
"fr" "Impossible de changer d'équipe juste après avoir déclenché un incendie ou détruit un baril explosif."
}
"Can not change team after throw"
{
"en" "Can not change team for a while after throwing a grenade."
"fr" "Impossible de changer d'équipe juste après avoir lancé une grenade."
}
"Please wait"
{
"#format" "{1:.0f}"
"en" "Please wait {1} second(s) to change team again."
"fr" "Veuillez patienter {1} secondes pour rechanger d'équipe."
}
"Can not change team as dead survivor"
{
"en" "Can not change team as dead survivor"
"fr" "Vous êtes un survivant mort, changer d'équipe est interdit."
}
"Can not change team during the game!!"
{
"en" "Impossible to change team until the round has started."
"fr" "Impossible de changer d'équipe après que le round a commencé."
}
"You are a dead survivor"
{
"en" "You are a dead survivor, switching team is prohibited."
"fr" "Vous êtes un survivant mort, changer d'équipe est interdit."
}
"Go Back You Team"
{
"#format" "{1:s}"
"en" "Go Back to {1} team, switching team is prohibited until the round has started."
"fr" "Retournez dans l'équipe des {1}, il n'est pas autorisé de faire de changement après que le round a commencé."
}
"You can change team now."
{
"en" "You can change team now."
"fr" "Vous pouvez maintenant changer d'équipe."
}
"Infected Attack Block"
{
"en" "Can not change team when you are capped by a special infected."
"fr" "Impossible de changer d'équipe quand vous etes pris pour cible par un infecté spécial."
}
}
Last edited by DarkDeviL; 11-20-2020 at 04:11.
Reason: Changed from QUOTE to CODE tags