divide the survivors into two teams according to the model: yellow if l4d2, green if l4d1. can't revive/heal/defib/pass pills across team. bot won't try to liberate besieged across team.
you'd better use auto respawn plugins and self revive plugins in coop mode, or bot takeover plugin in survival.
current support translation: chi(Simplified Chinese). I won't add more translations, you could make your own or ask another one.
/**
* @brief Called when someone try to give pill/adrenaline across team but blocked
*
* @param giver client index who try to give
* @param receiver client index who try to receive
* @param entity pill/adrenaline index
*
* @noreturn
*/
forward void SurvivorArena_OnTakePillsBack(int giver, int receiver, int entity);
/**
* @brief Get the current arena team of a client
*
* @param client client index
*
* @return 0 if no team, 1 if green, 2 if yellow
*
*/
native int SurvivorArena_GetTeam(int client);
Change log
Spoiler
Code:
1.18 test (2024-03-26:
-minor improve.
1.17 test (2024-03-26:
-fix not correctly block usermsg of giving pills across team.
1.16 test (2024-03-22:
-minor change of natives.
-update .inc file.
1.15 test (2024-03-18:
-prevent sometimes can pass entity other than pills/adrenaline in forward "SurvivorArena_OnTakePillsBack".
1.14 test (2024-03-16:
-fix rare "client not in game" error.
1.13 test (2024-03-14:
-bots no longer try to shoot witch if its target is in opponent team.
1.12 test (2024-03-13:
-fix revive anim not correctly interrupted.
-try to prevent sometimes model be repetitive.
1.11 test (2024-03-12:
-better method to prevent sometimes bots try to help across team.
1.10 test (2024-03-11:
-bots no longer try to get closer to incapped or pinned across team.
1.9 test (2024-03-11:
-remove cvar "4v4_arena_glow_through_wall" casue it brings bugs.
-change default value of cvar "4v4_arena_print_interval" to 10.0.
-now add glow to active weapon.
1.8 test (2024-03-11:
-minor improve
1.7 test (2024-03-10:
-fix sometimes bots try to liberate besieged across team.
1.6 test (2024-03-09:
-improve pills take back when across team, no spam events happens too quickly.
-fix not correctly block give pills message.
1.5 test (2024-03-09:
-reset glow on plugin end.
1.4 test (2024-03-09:
-no longer allow human player give pills across team.
-add forward "SurvivorArena_OnTakePillsBack".
-update .inc file and translations file.
1.3 test (2024-03-08:
-try to defib across team will make the death body and defibrillator disappear.
1.2 test (2024-03-08:
-fix client is 0 error.
1.1 test (2024-03-08:
-add cvar "4v4_arena_glow_through_wall".
-add native "SurvivorArena_GetTeam".
1.0 test (2024-03-08:
-init public release.