So I loaded the shield model up (models/props_mvm/mvm_player_shield.mdl) and found out it has an unused BLU skin (which doesn't have the veiny energy lines that the RED skin has).
So I modified the code that Pelipoika created, and made it spawn the blue skin for the BLU team.
PHP Code:
if (IsValidClient(client) && IsPlayerAlive(client) && TF2_GetPlayerClass(client) == TFClass_Medic)
{
new shield = CreateEntityByName("entity_medigun_shield");
if(shield != -1)
{
DispatchSpawn(shield);
SetEntPropEnt(shield, Prop_Send, "m_hOwnerEntity", client);
SetEntProp(shield, Prop_Send, "m_iTeamNum", GetClientTeam(client));
//SetEntProp(shield, Prop_Send, "m_iSkin", GetClientTeam(client)); <--This didn't work, sadly
if (GetClientTeam(client) == _:TFTeam_Red) DispatchKeyValue(shield, "skin", "0");
else if (GetClientTeam(client) == _:TFTeam_Blue) DispatchKeyValue(shield, "skin", "1");
Delay(client);
return Plugin_Handled;
}
}
Now, there is a second shield model, and it seems to be an upgraded version of the first shield. The model is "models/props_mvm/mvm_player_shield2.mdl. I don't know how to trigger the upgraded shield to appear, and there's no keyvalue info on the Valve Developer Wiki yet, so I'm at a loss.
But yeah, team-coloring on the shield!
I was wondering if Pelipoika would be ok with me modifying his work, adding a timer convar to choose the delay, adding in the blue shield for BLU Medics, etc and releasing it publicly. If not, then feel free to use the above code Peli.