Trying to write a plugin that add's buyzones to the map if there are none.
Now I have 2 problems:
- I could not figure out a good way to get the team spawn coordinates to teleport the buyzone to. Right now I'm looping through all clients to get a t and ct client's position.
- It doesn't work. No errors, the buyzone just doesn't show up. With bots i got the following console message:
pos0: 632.000000, pos1: 267.000000, pos2: -295.000000(debug msg by plugin)
CT bot spawned outside of a buy zone (632, 267, -295)
As you can see, I already tried to move the 3. coordinate, because it seemed to be > than the bot spawn coordinate otherwise - no success.
public Plugin:myinfo =
name = "Add Buyzone",
author = "kumpu",
description = "Adds a buyzone if there is none",
version = "1.0",
url = ""
HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
public Event_RoundStart(Handle:event, const String:name, bool:dontBroadcast)
new bool:hasBuyZone = false;
for (new i = MaxClients; i <= GetMaxEntities(); i++)
if(IsValidEdict(i) && IsValidEntity(i))
GetEdictClassname(i, szClass, sizeof(szClass));
hasBuyZone = true;
The only way is to use prop_dynamic's with wall models
But, may be there is another way: http://www.youtube.com/watch?v=mjGByP5hRNY 1.05
There is a transparent bridge which is made of brush and players can spray decals on it. Perhaps you can recreate this brush entity with the help of this tutorial and texture it with decals
When the bridge disables, decals sprayed on it disables too. So, even if it will work, you won't be able to make physics visible brush this way