PHP Code:
g_StartShieldRegen[client] = false;
g_ReinShield[client] = true;
g_SetAnim[client] = false;
new String:health[256];
IntToString(g_ReinShieldHealth[client], health, sizeof(health));
SetEntPropEnt(shield, Prop_Send, "m_hOwnerEntity", client);
SetEntityMoveType(shield, MOVETYPE_VPHYSICS);
DispatchKeyValue(shield, "classname", "entity_medigun_shield");
SetEntData(shield, g_CollisionOffset, 2, 4, true);
SetEntProp(shield, Prop_Send, "m_iTeamNum", GetClientTeam(client));
//SetEntProp(shield, Prop_Data, "m_CollisionGroup", 13|2);
//SetEntData(shield, g_CollisionOffset, 2, 4, true);
DispatchKeyValue(shield, "model", "models/props_mvm/mvm_player_shield2.mdl");
DispatchKeyValue(shield, "ModelScale", "0.95");
if (TF2_GetClientTeam(client) == TFTeam_Red)
DispatchKeyValue(shield, "skin", "0");
else if (TF2_GetClientTeam(client) == TFTeam_Blue)
DispatchKeyValue(shield, "skin", "1");
DispatchSpawn(shield);
SetVariantInt(g_ReinShieldHealth[client]);
AcceptEntityInput(shield, "SetHealth");
SDKHook(shield, SDKHook_OnTakeDamage, Rein_ShieldHook);
SDKHook(client, SDKHook_OnTakeDamage, Client_DamageHook);
EmitSoundToClient(client, "weapons/medi_shield_deploy.wav", shield);
g_ReinEntity[client] = EntIndexToEntRef(shield);
SetVariantInt(1);
AcceptEntityInput(client, "SetForcedTauntCam");
TF2_RemoveAllWeapons(client);
for(new i=0; i<=5; i++)
{
TF2_RemoveWeaponSlot(client, i);
}
GiveWeapon(client, "ReinhartShield");
SetEntPropFloat(client, Prop_Data, "m_flMaxspeed", 95.0);
g_reinbreak[client] = true;
I script sourcemod like this, but projectile go through the shield
How to fix it?