I'd like to prevent players to reach certain places of standard TF2 maps.
This could be done using BAILOPAN's Stripper but I cannot use it for performance reasons, so I'm looking for a way to create walls (visible or invisible) using a sourcemod plugin.
Is it possible? Which is the best way to do so?
I tried adding a model to the map (cp_badlands) using the following code in OnMapStart, but I must be doing something wrong since this has absolutely no effect.
Code:
decl Float:origin[3];
origin[0] = 2584.0;
origin[1] = 2780.0;
origin[2] = 140.0;
new Float:angles[3];
new ent1 = CreateEntityByName("prop_physics_override");
PrecacheModel("models/props_hydro/barricade.mdl", true);
SetEntityModel(ent1, "models/props_hydro/barricade.mdl");
SetEntityMoveType(ent1, MOVETYPE_NONE);
SetEntProp(ent1, Prop_Data, "m_CollisionGroup", 0);
SetEntProp(ent1, Prop_Data, "m_usSolidFlags", 28);
SetEntProp(ent1, Prop_Data, "m_nSolidType", 6);
DispatchSpawn(ent1);
AcceptEntityInput(ent1, "DisableShadow");
AcceptEntityInput(ent1, "DisableMotion");
TeleportEntity(ent1, origin, angles, NULL_VECTOR);
SetEntityRenderMode(ent1, RENDER_ENVIRONMENTAL);
I also wonder if there is an easier way, since an invisible rectangular wall will be perfect for my needs.