/*
Автор: 6u3oH
Контакты: vk.com/6u3oH
Прошу посетить группу: https://vk.com/halt_gamers
Если у вас есть какое-либо предложение по созданию плагина (любая идея), вы можете смело предложить в этой группе.
А так же если вы нашли какой-либо баг, то в данной группе вы можете его описать, после чего он будет исправлен.
Спасибо, что скачали этот плагин!
*/
#include
#include
#include
#include
#include
#include
#include
#define PLUGIN "Heroes Mode"
#define VERSION "1.0"
#define AUTHOR "6u3oH"
#define Ham_CS_Player_ResetMaxSpeed Ham_Item_PreFrame // если amxmodx > 1.8.3, то закоментируйте строку
#define HeroesAmmount 4 // Максимум героев [Не трогать]
#define MaxPlayer 32 // Максимум игроков [Не трогать]
#define TaskIdOne 19867 // Ид задачи [Не трогать]
new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_8|MENU_KEY_0;
new keys2 = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_8|MENU_KEY_0;
new gHero[MaxPlayer];
new OptionSave[MaxPlayer];
new const HeroModel1[] = "models/player/hero1/hero1.mdl"; // Путь до модели героя 1
new const HeroModel2[] = "models/player/hero2/hero2.mdl"; // Путь до модели героя 2
new const HeroModel3[] = "models/player/hero3/hero3.mdl"; // Путь до модели героя 3
new const HeroModel4[] = "models/player/hero4/hero4.mdl"; // Путь до модели героя 4
new HeroesList[HeroesAmmount][]=
{
"Хиппер", // Имя 1 героя
"Мэйтдрайв", // Имя 2 героя
"Хэбатор", // Имя 3 героя
"Фрилансия" // Имя 4 героя
};
new HeroesDescription[HeroesAmmount][]=
{
"Баланс сил: HP[+], Speed [+], Jump [+]", // Описание способности 1 героя
"Гравитация: HP [+], Speed [+], Jump [++]", // Описание способности 2 героя
"Сильный: HP [++], Speed [-], Jump [-] Dmg [+]", // Описание способности 3 героя
"Скорость: HP [+], Speed [++], Jump [+]" // Описание способности 4 героя
};
new HeroesHealth[HeroesAmmount]=
{
110, // Кол-во здоровья у 1 героя
110, // Кол-во здоровья у 2 героя
130, // Кол-во здоровья у 3 героя
105 // Кол-во здоровья у 4 героя
};
new Float: HeroesSpeed[HeroesAmmount]=
{
270.0, // Скорость 1 героя
270.0, // Скорость 2 героя
250.0, // Скорость 3 героя (250.0 - стандартная)
300.0 // Скорость 4 героя
};
new Float: HeroesGravity[HeroesAmmount]=
{
0.9, // Значение гравитации у 1 героя
0.8, // Значение гравитации у 2 героя
1.0, // Значение гравитации у 3 героя (1.0 - стандартная)
0.9 // Значение гравитации у 4 героя
};
new Float: DmgHero = 1.2; // Насколько умножать урон у героя Хэбатор
public plugin_precache()
{
precache_model(HeroModel1);
precache_model(HeroModel2);
precache_model(HeroModel3);
precache_model(HeroModel4);
}
public plugin_connect(id)
{
gHero[id] = 0;
}
public plugin_disconnect(id)
{
remove_task(TaskIdOne);
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /hero", "HeroesMenu");
public Menu_Description(id, key)
{
if(!is_user_alive(id))
return;
code
switch(key)
{
case 0: client_print(id, print_chat, "Автор плагина: 6u3oH"); // Пункт нажать нельзя
case 1: client_print(id, print_chat, "Контакты: vk.com/6u3oH"); // Потому пишу здесь
case 2: client_print(id, print_chat, "Группа Вконтакте:"); // На правах автора
case 3: client_print(id, print_chat, "vk.com/halh_gamers"); // Свою рекламу
case 7: HeroesMenu(id)
}
public ModelChangeFunction(id)
{
if(!is_user_alive(id))
return;
code
switch(gHero[id])
{
case 0: cs_set_user_model(id, "hero1");
case 1: cs_set_user_model(id, "hero2");
case 2: cs_set_user_model(id, "hero3");
case 3: cs_set_user_model(id, "hero4");
}
}
public HealthFunction(id)
{
if(!is_user_alive(id))
return;
code
set_user_health(id, HeroesHealth[gHero[id]]);
}
public SpeedFunction(id)
{
if(!is_user_alive(id))
return;
This script is an AMX Mod X plugin designed for Counter-Strike 1.6. It creates a "Heroes Mode," allowing players to choose from a selection of heroes, each with unique attributes such as health, speed, gravity, and special abilities. Here's a breakdown of key features and components of the script:
Metadata and Includes:
The script includes necessary AMX Mod X libraries such as amxmodx, colorchat, cstrike, etc.
It defines metadata like PLUGIN, VERSION, and AUTHOR.
There's a comment header with the author's contact info and a VK group link for feedback or bug reporting.
Constants and Variables:
The script defines various constants for the plugin's configuration, such as the number of heroes, max players, and task ID.
It uses arrays to store hero models, names, descriptions, and attributes like health, speed, and gravity.
Hero Attributes:
Each hero has specific attributes:
Hero 1 ("Хиппер"): Balanced in HP, Speed, and Jump.
Hero 2 ("Мэйтдрайв"): Good at gravity, enhanced in HP, Speed, and Jump.
Hero 3 ("Хэбатор"): High HP and damage but reduced speed and jump.
Hero 4 ("Фрилансия"): High speed and good in HP and Jump.
Main Functions:
plugin_precache(): Preloads the hero models for use during the game.
plugin_connect() and plugin_disconnect(): Manages the player's hero state upon connection and disconnection.
plugin_init(): Registers the plugin with the server and initializes various hooks like command callbacks and game events.
HudMessage(), HeroesMenu(), and DescriptionMenu(): Display player HUD messages and menus for hero selection and descriptions.
Gameplay Mechanics:
SpawnFunction(): Triggered upon player respawn to set hero stats like model, health, and gravity, and present the hero selection menu.
TakeDamageFunction(): Modifies damage calculation based on the attacker's hero type.
ModelChangeFunction(), , , : Adjust player's model, health, speed, and gravity based on their chosen hero.
User
// Gun Xp Mod Include File //
#if defined _gunxpmod_included
#endinput
#endif
#define _gunxpmod_included
native get_bonus_xp(id); //Get bonus XP
native get_k1asus(id); //Get k1asus count
native get_supp_box(id); //Get supply box XP from
native get_forcefield_time(id); //Get force field additional time
native get_pipe_radius(id); //Get percent of additional radius
//************
//get if loaded levels
native gxm_level_loaded(id);
//save user level/xp/prestige
native gxm_save_level(id);
//get user save type
native get_user_save_type(id);
// Returns player Experience.
native get_user_xp(id)
// Sets player Experience.
native set_user_xp(id, amount)
// Returns player Prestige.
native get_user_prestige(id)
// Sets player Prestige.
native set_user_prestige(id, amount)
// Returns player Level.
native get_user_level(id)
// Sets player Level.
native set_user_level(id, amount)
// Returns player Level by Xp.
native get_user_max_level(id)
This include file is part of a Gun XP Mod for Counter-Strike, which enhances the gameplay by introducing a leveling system with unlockable weapons and skills. Below is a detailed breakdown of its components:
Constants and Definitions
Section Definitions: These constants (GUN_SECTION_KNIFE, GUN_SECTION_PISTOL, etc.) represent different categories or sections of weapons/items within the mod, affecting how items are categorized and unlocked.
Access Levels: Constants like GUN_FIRST_ACCESS, GUN_SECOND_ACCESS, and GUN_THIRD_ACCESS define the access levels required to unlock certain features, corresponding to different admin privilege levels.
Class Prices: Determines how class prices are calculated, either by XP (CLASS_PRICE_XP) or another parameter (CLASS_PRICE_PR).
Custom Weapon Definitions: New weapons (e.g., CSW_SANDBAGS) can be defined for special items not natively found in CS.
Native Functions
These are interfaces provided by this include file to allow other plugins to interact with the XP system:
XP and Level Management:
get_user_xp(), set_user_xp(): Retrieve and set player experience.
get_user_level(), set_user_level(): Manage player levels.
get_user_prestige(), set_user_prestige(): Manage player prestige levels.
get_user_save_type(): Determine how user data is saved.
Loading and Saving:
gxm_level_loaded(): Check if levels are loaded for a player.
gxm_save_level(): Save player's level/xp/prestige data.
Skill/Item Registration:
register_gxm_item(): Register new items with the XP mod.
register_item_gxm(): Alternative method for registering items.
register_gxm_apwr(): Register skills with costs, level requirements, and access restrictions.
Stock Functions
These are helper functions provided within this include file:
User
using the 'Gun Xp Mod Include File' make the heroes unlockable with prestige
Assistant
To integrate the "Gun XP Mod" system with the hero selection functionality such that heroes become unlockable based on a player's prestige, you'll need to make some modifications. This involves using the native functions provided by the "Gun XP Mod Include File" to check and manage prestige and then adjust the hero selection logic accordingly.
Here’s an example of how you could modify the original script to incorporate this functionality:
Define New Constants
Define constants for new prestige requirements for each hero:
c
#define HERO1_PRESTIGE 0 // Require no prestige for Hero 1
#define HERO2_PRESTIGE 1 // Require 1 prestige for Hero 2
#define HERO3_PRESTIGE 2 // Require 2 prestige for Hero 3
#define HERO4_PRESTIGE 3 // Require 3 prestige for Hero 4
Modify Hero Selection Logic
In the Menu_Heroes function, implement checks to ensure that the player has the required prestige level to select a hero:
the heroes models can be applied only on CT players
Assistant
To ensure that hero models are only applied to Counter-Terrorist (CT) players, you need to modify the function responsible for changing player models. This involves checking the player's team before applying the model change. Here's how you can adjust your script to implement this restriction:
Modify the ModelChangeFunction to Check Team
You need to ensure that the model is only changed if the player is part of the CT team. Here’s how you can do it:
c
public ModelChangeFunction(id)
{
// Check if the player is alive
if (!is_user_alive(id))
return;
// Check if the player is on the Counter-Terrorist team
if (cs_get_user_team(id) == CS_TEAM_CT)
{
// Apply hero model based on selected hero
switch (gHero[id])
{
case 0: cs_set_user_model(id, "hero1");
case 1: cs_set_user_model(id, "hero2");
case 2: cs_set_user_model(id, "hero3");
case 3: cs_set_user_model(id, "hero4");
}
}
else
{
// If the player is not in the CT team, revert to default model
cs_reset_user_model(id);
}
}
Explanation
Team Check: Use cs_get_user_team(id) to determine the player's current team. CS_TEAM_CT is the predefined constant that represents the Counter-Terrorist team.
Model Application: Apply the hero model only if the player is part of the CT team. If not, reset to the default model using cs_reset_user_model(id) to ensure no changes are made for Terrorist team members.
Switch Logic: The switch case maps the hero index to specific models, ensuring the model is only applied when the selection is valid and the team check passes.
Default Handling: When a player is not a CT, you reset their model to the original to prevent any discrepancies.
By incorporating these changes, your plugin will ensure that hero models are applied exclusively to players on the CT team, aligning with your specified game mechanics and requirements.
User
im using this hero mode with a zombie mode, and they are conflicting with each other, when a hero is chosen and active, the models will remain active even if the player is a zombie.
the zombie mode recognizes the T team as zombies and CT as humans.
Assistant
To ensure that hero models are properly managed when integrating with a Zombie Mode—where typically the Terrorist (T) team is zombies and the Counter-Terrorist (CT) team is humans—you'll need to make sure that hero models are not applied when a player has become a zombie. Here's how you can implement this:
Step-by-Step Solution
Detect Zombie State: You'll need to check if the player is in a zombie state before applying the hero model. This might involve checking a specific condition based on your Zombie Mode mod (e.g., a custom function or variable that identifies if a player is a zombie).
Conditional Model Application: Adjust the model application logic to ensure hero models are only applied if the player is a human (CT) and not a zombie.
Revert Model for Zombies: Reset models for players when they become zombies.
Implementation Example
Suppose your Zombie Mode plugin provides a way to check if a player is a zombie, possibly with a function like is_user_zombie(id). You would adjust the hero model logic as follows:
c
public ModelChangeFunction(id)
{
// Check if the player is alive
if (!is_user_alive(id))
return;
// Check if the player is on the Counter-Terrorist team and not a zombie
if (cs_get_user_team(id) == CS_TEAM_CT && !is_user_zombie(id))
{
// Apply hero model based on selected hero
switch (gHero[id])
{
case 0: cs_set_user_model(id, "hero1");
case 1: cs_set_user_model(id, "hero2");
case 2: cs_set_user_model(id, "hero3");
case 3: cs_set_user_model(id, "hero4");
}
}
else
{
// Revert to default model if the player is not supposed to have a hero model (e.g., they are a zombie)
cs_reset_user_model(id);
}
}
Explanation
Zombie Check: is_user_zombie(id) is a placeholder function representing whatever method your Zombie Mode mod provides to determine if a player is a zombie. You’ll need to replace this with the actual method used by your mod.
User
don't make reset to default model, but reset to the last chasen hero if the player had chosen one in the round
Assistant
To ensure that when a player transitions to a zombie their model changes accordingly, but if they revert or respawn as a human (CT) the previously chosen hero model is reapplied, you need to maintain state information about the player's last chosen hero. Here's how you can implement this:
Implementation Steps
Track Hero Model Changes: Instead of resetting to the default model, store the player's last chosen hero model when they become a zombie.
Reapply Hero Model on Respawn: When a player respawns or transitions back to a human, check if they had previously selected a hero and reapply that hero model.
Implementation Example
Let's adjust the code to handle these requirements:
c
new lastHeroModel[MaxPlayer]; // Array to store the last chosen hero model for each player
public ModelChangeFunction(id)
{
// Check if the player is alive
if (!is_user_alive(id))
return;
// Check if the player is on the Counter-Terrorist team and not a zombie
if (cs_get_user_team(id) == CS_TEAM_CT && !is_user_zombie(id))
{
// Apply hero model based on selected hero
switch (gHero[id])
{
case 0:
cs_set_user_model(id, "hero1");
lastHeroModel[id] = 0;
break;
case 1:
cs_set_user_model(id, "hero2");
lastHeroModel[id] = 1;
break;
case 2:
cs_set_user_model(id, "hero3");
lastHeroModel[id] = 2;
break;
case 3:
cs_set_user_model(id, "hero4");
lastHeroModel[id] = 3;
break;
}
}
else if (is_user_zombie(id))
{
// When player becomes a zombie, do not set hero model, keep the current zombie model
// Save the last hero model so it can be reapplied when they return to CT
lastHeroModel[id] = gHero[id];
}
}
// Add a respawn or round start handler to reapply the model
public PlayerRespawn(id)
{
// Check if the player is alive and on the CT team
if (!is_user_alive(id) || cs_get_user_team(id) != CS_TEAM_CT)
return;
// Reapply the last chosen hero model if any and player is not a zombie
if (!is_user_zombie(id) && lastHeroModel[id] != -1)
{
ModelChangeFunction(id); // Call function to reapply the hero model
}
}
// Initialize lastHeroModel array to -1 on player connect or new round to indicate no model chosen
public plugin_connect(id)
{
lastHeroModel[id] = -1; // Initialize to -1 (no model chosen)
}
User
Error: Only a single statement (or expression) can follow each "case" on line:
"case 0: cs_set_user_model(id, "hero1");
lastHeroModel[id] = 0;"
Assistant
In SourcePawn (the scripting language used here), each case statement directly associates with a single statement. If you need to execute multiple statements within a case, you should use curly braces {} to group those statements into a block. This makes the scope explicit and ensures that all the statements within the block are executed as part of that case.
You can adjust the switch block in the ModelChangeFunction like this:
c
public ModelChangeFunction(id)
{
// Check if the player is alive
if (!is_user_alive(id))
return;
// Check if the player is on the Counter-Terrorist team and not a zombie
if (cs_get_user_team(id) == CS_TEAM_CT && !is_user_zombie(id))
{
// Apply hero model based on selected hero
switch (gHero[id])
{
case 0: {
cs_set_user_model(id, "hero1");
lastHeroModel[id] = 0;
}
case 1: {
cs_set_user_model(id, "hero2");
lastHeroModel[id] = 1;
}
case 2: {
cs_set_user_model(id, "hero3");
lastHeroModel[id] = 2;
}
case 3: {
cs_set_user_model(id, "hero4");
lastHeroModel[id] = 3;
}
}
}
else if (is_user_zombie(id))
{
// When player becomes a zombie, do not set hero model, keep the current zombie model
// Save the last hero model so it can be reapplied when they return to CT
lastHeroModel[id] = gHero[id];
}
}
Explanation
Curly Braces: Each case statement that manages multiple statements in its execution path is enclosed in curly braces {}. This allows for multiple operations to be performed when a case is triggered.
Code Clarity: Using block notation {} makes it clear which statements are associated with which case, enhancing code readability and maintainability.
This should resolve the compile error you're encountering and allow the switch-case logic to execute as intended.
User
the previous problem came back: "when a hero is chosen and active, the models will remain active even if the player is a zombie."
Assistant
To solve the issue where the hero models remain active even if the player becomes a zombie, we need to make sure the model is updated correctly when the player transitions to a zombie. This can be done by explicitly updating to a zombie model when the player changes state.
Below is how you can handle this:
Steps
Identify When a Player Becomes a Zombie: You need a method to detect when a player transitions to a zombie state. This might involve hooking into the zombie mode plugin to handle transitions properly.
Change Model on State Change: When a player becomes a zombie, set the model to a zombie-specific model.
Ensure Hero Models Only Apply for Humans (CT): Only apply hero models if a player is in a human state and on the CT team.
Example Code
Ensure these functions and integrations with your Zombie Mode plugin:
c
public ModelChangeFunction(id)
{
// Check if the player is alive
if (!is_user_alive(id))
return;
// Check if the player is on the Counter-Terrorist team and not a zombie
if (cs_get_user_team(id) == CS_TEAM_CT && !is_user_zombie(id))
{
// Apply hero model based on selected hero
switch (gHero[id])
{
case 0: {
cs_set_user_model(id, "hero1");
lastHeroModel[id] = 0;
}
case 1: {
cs_set_user_model(id, "hero2");
lastHeroModel[id] = 1;
}
case 2: {
cs_set_user_model(id, "hero3");
lastHeroModel[id] = 2;
}
case 3: {
cs_set_user_model(id, "hero4");
lastHeroModel[id] = 3;
}
}
}
else if (is_user_zombie(id))
{
// When player becomes a zombie, explicitly set to a zombie model
cs_set_user_model(id, "zombie"); // Replace "zombie" with the actual zombie model name used in your game
// Save the last hero model so it can be reapplied when they return to CT
lastHeroModel[id] = gHero[id];
}
}
public PlayerBecomeZombie(id)
{
// Ensure this function or an equivalent is called when a player turns into a zombie
if (is_user_zombie(id))
{
// Set model to zombie model
cs_set_user_model(id, "zombie"); // Use your zombie mode's specific model name
}
}
// Assuming you have a hook or event that triggers when a player transitions
// e.g., assume `PlayerBecomeZombie` is correctly triggered by your zombie mode.
Not yet included in a published release.
HealthFunction()
SpeedFunction()
GravityFunction()
Menus and Input Handling:
Uses menus to allow players to select heroes and view descriptions.
Handles input through registered menu commands to change the player's hero.
Customization:
Players can choose from predefined heroes, and admins can modify attributes and descriptions to balance or customize gameplay.
By exploiting these features, the plugin enriches the gameplay experience by adding an RPG-like element with customizable heroes, each offering a strategic advantage based on their unique attributes.
stock find_skillindex()
{
new temp[2], name[64], pluginname[64];
get_plugin(-1, pluginname, 63, temp, 1, temp, 1, temp, 1, temp, 1);
for (new i = 0; i < get_pluginsnum(); ++i) {
get_plugin(i, name, 63, temp, 1, temp, 1, temp, 1, temp, 1);
if(equal(name, pluginname)) { return i; }
}
return -1
}
stock register_gxm_apwr(skill_name[], skill_desc[], skill_cost, skill_level, skill_access)
{
new skill_index = find_skillindex(), skillplugin = find_skillplugin();
new itemregfunc = get_func_id("register_apwr_gxm", skillplugin);
code
new temp = callfunc_begin_i(itemregfunc, skillplugin);
if(temp == -1 || temp == -2)
{
if(temp == -2) { log_amx("You have to many skill and need to increase the MAX_SKILLS define!"); }
else { log_amx("A unkown error has happend, make sure the Skills plugin is loaded!"); }
return PLUGIN_HANDLED;
}
callfunc_push_int(skill_index);
callfunc_push_str(skill_name);
callfunc_push_str(skill_desc);
callfunc_push_int(skill_cost);
callfunc_push_int(skill_level);
callfunc_push_int(skill_access);
temp = callfunc_end();
if(temp == -1 || temp == -2) { return PLUGIN_HANDLED; }
return temp;
}
find_itemplugin(), find_itemindex(): Helper functions to locate the item-handling plugin within the server's plugin list. This ensures items are properly registered and managed within the context of the mod.
find_skillplugin(), find_skillindex(): Similar to item functions, these locate the plugin and index for managing skills.
Functionality
Power and Skill System: Includes definitions and native functions that allow for the customization of player abilities through a skill system managed with XP.
Level & Prestige System: Supports a structure where players can progress through levels, earn prestige, and unlock new skills and weapons based on their progress.
Admin Access Control: Integrates with the server's admin controls to restrict access to high-level or game-altering features to certain privileged players.
Overall, this include file sets the foundation for a Gun XP Mod, managing player progression, ensuring proper registration and implementation of custom items/skills, and providing a robust interface for other server plugins to interact with these systems.
Helper Functions
Create helper functions to manage the hero selection process:
c
// Function to finalize hero selection
stock finalizeHeroSelection(id) {
OptionSave[id] = true;
ModelChangeFunction(id);
HealthFunction(id);
SpeedFunction(id);
GravityFunction(id);
MessageInfo(id);
}
// Function to notify player of insufficient prestige
stock notifyInsufficientPrestige(id, requiredPrestige) {
ColorChat(id, RED, "Недостаточно престижа для выбора этого героя. Требуется престиж: ^4%d", requiredPrestige);
}
Considerations
Prestige Information: Ensure the players have a clear understanding of what prestige is and how to gain it. You might need to add explanations in your plugin's documentation or game instructions.
Prestige Progression: Consider how players earn prestige in your system. Make sure it’s well-balanced so that players can reach required prestige levels in a reasonable time.
Integration Testing: After making these modifications, test the integration thoroughly to ensure everything works as expected, including saving and loading of levels and prestige information.
This approach integrates the concept of unlocking heroes through game progression (prestige), adding another dimension to the dynamics of your Counter-Strike mod.
Conditional Application: The model is only applied if the player is both on the CT team and not a zombie, ensuring hero functionality only for human players.
Model Reset for Zombies: If a player is a zombie or not on the CT team, their model is reset to prevent any hero model from remaining.
Additional Considerations
Event Hooks: Make sure to handle events where players can transition to zombies (e.g., round start, infection events) to reset their models appropriately.
Compatibility Testing: Thoroughly test the integration of the two mods on your server to ensure that all edge cases are handled, such as respawns and mid-round infections.
This adjustment will help maintain a consistent game-state, ensuring that hero models are only visible when appropriate, without interfering with the mechanics of your Zombie Mode.
Explanation
State Tracking: lastHeroModel tracks the last chosen hero for each player. It is updated whenever the model changes due to a hero selection.
Zombie Check: When a player becomes a zombie, their current model is not changed but their last hero choice is stored for potential future use when they return to human state.
Model Reapplication: On respawn or when the player returns to the human team, the previously selected hero model is reapplied.
Initialization: The plugin_connect function initializes lastHeroModel to -1 to indicate that a player has not yet chosen a hero this round.
This approach ensures that hero models are managed correctly across zombie transitions and player respawns, maintaining continuity of the intended gameplay experience.
Key Points
Zombie Model Assignment: Set the model directly when a player changes into a zombie. Make sure "zombie" is replaced with the correct model name your zombie mode uses.
Functionality Hooking: Ensure the PlayerBecomeZombie() function is called by your zombie mode when a player is infected or transformed into a zombie. This might require changes or integrations with the existing Zombie Mode logic.
Model Reset Mechanism: When a player turns into a zombie, the model change requires explicit handling by setting their model appropriately.
This way, you'll force a model change as players transition between human and zombie states, ensuring hero models are only active when appropriate.