So, what I am trying to do is that when Player from CT team create a wall entity, only that player, and whole CT team can pass through that wall, and T team can't. Also, wall has to take damage from T team only.
Attempt #1
Here, everything works except T can't damage the wall. Reason: Wall can't take damage because it's SOLID_TRIGGER (don't know the fix tho)
// In wall creation function new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, PALLET_FUNC));
set_pev(ent,pev_classname,PALLET_CLASSNAME); set_pev(ent,pev_solid,SOLID_TRIGGER); // Because of this trigger, wall can't take damage set_pev(ent,pev_movetype,MOVETYPE_FLY);
// when player touches wall public touch_sandbags(ent, touched) { switch(g_IsZombie[touched]) { case true: { static Float:pos_force[3] static Float:pos_player[3]
for(new i = 0; i < 3; i++) { pos_player[i] -= pos_force[i] pos_player[i] *= 1.1 // Push player back, but just a bit so he still can keep hitting wall with the knife even when pushed away }