I had a very similar problem a few weeks ago.
This thread should tell you what you want about creating the box for god mode.
http://forums.alliedmods.net/showthread.php?t=56983
---[EDIT]----
Also, here is a very very fast plugin I whipped up to help me get the coords for where to place the box in the map.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "Box Coord Finder"
#define VERSION "1.0"
#define AUTHOR "hlstriker"
new x1;
new x2;
new y1;
new y2;
new z1;
new z2;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /x1", "getx1");
register_clcmd("say /x2", "getx2");
register_clcmd("say /y1", "gety1");
register_clcmd("say /y2", "gety2");
register_clcmd("say /z1", "getz1");
register_clcmd("say /z2", "getz2");
register_clcmd("say /center", "showCenter");
}
public getx1(id)
{
new origin[3];
get_user_origin(id, origin, 3);
x1 = origin[0];
client_print(0, print_chat, "X 1 = %d", x1);
return PLUGIN_CONTINUE;
}
public getx2(id)
{
new origin[3];
get_user_origin(id, origin, 3);
x2 = origin[0];
client_print(0, print_chat, "X 2 = %d", x2);
return PLUGIN_CONTINUE;
}
public gety1(id)
{
new origin[3];
get_user_origin(id, origin, 3);
y1 = origin[1];
client_print(0, print_chat, "Y 1 = %d", y1);
return PLUGIN_CONTINUE;
}
public gety2(id)
{
new origin[3];
get_user_origin(id, origin, 3);
y2 = origin[1];
client_print(0, print_chat, "Y 2 = %d", y2);
return PLUGIN_CONTINUE;
}
public getz1(id)
{
new origin[3];
get_user_origin(id, origin, 3);
z1 = origin[2];
client_print(0, print_chat, "Z 1 = %d", z1);
return PLUGIN_CONTINUE;
}
public getz2(id)
{
new origin[3];
get_user_origin(id, origin, 3);
z2 = origin[2];
client_print(0, print_chat, "Z 2 = %d", z2);
return PLUGIN_CONTINUE;
}
public showCenter(id)
{
new xDis, yDis, zDis;
new x, y, z;
if(x1 > x2)
{
xDis = (x1 - x2) / 2;
x = x2 + xDis;
}
else if(x1 < x2)
{
xDis = (x2 - x1) / 2;
x = x1 + xDis;
}
else
{
client_print(0, print_chat, "You must first get the X distances.");
return PLUGIN_HANDLED;
}
if(y1 > y2)
{
yDis = (y1 - y2) / 2;
y = y2 + yDis;
}
else if(y1 < y2)
{
yDis = (y2 - y1) / 2;
y = y1 + yDis;
}
else
{
client_print(0, print_chat, "You must first get the Y distances.");
return PLUGIN_HANDLED;
}
if(z1 > z2)
{
zDis = (z1 - z2) / 2;
z = z2 + zDis;
}
else if(z1 < z2)
{
zDis = (z2 - z1) / 2;
z = z1 + zDis;
}
else
{
client_print(0, print_chat, "You must first get the Z distances.");
return PLUGIN_HANDLED;
}
client_print(0, print_chat, "ENT COORDS = [X = %d] - [Y = %d] - [Z = %d]", x, y, z);
client_print(0, print_chat, "RADIUS' = [X = %d] - [Y = %d] - [Z = %d]", xDis, yDis, zDis);
// Set box
new ent = create_entity("info_target");
new Float:origin[3];
origin[0] = float(x);
origin[1] = float(y);
origin[2] = float(z);
entity_set_origin(ent, origin);
new Float:mins[3], Float:maxs[3];
mins[0] = origin[0] - float(xDis);
mins[1] = origin[1] - float(yDis);
mins[2] = origin[2] - float(zDis);
maxs[0] = origin[0] + float(xDis);
maxs[1] = origin[1] + float(yDis);
maxs[2] = origin[2] + float(zDis);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(31); // TE_BOX
write_coord(floatround(mins[0])); // boxmins
write_coord(floatround(mins[1]));
write_coord(floatround(mins[2]));
write_coord(floatround(maxs[0])); // boxmaxs
write_coord(floatround(maxs[1]));
write_coord(floatround(maxs[2]));
write_short(200); // life in 0.1 s (200 = 20 sec)
write_byte(255); // r
write_byte(0); // g
write_byte(0); // b
message_end();
remove_entity(ent);
return PLUGIN_CONTINUE;
}
To use it all you have to do is look at every 'face' of where the box should go and type the correct origin.
Example:
- Pretend you are in a square room.
- Look straight at the wall in front of you, type /x1
- Look straight at the wall opposite from the wall you just looked at, type /x2
- Look at the side wall, type /y1
- Look at the opposite side wall, type /y2
- Look at the ceiling, type /z1
- Look at the floor, type /z2
- Now type /center
- A box outlined in little dots should appear and it should give you all the needed coords.
Note: the /y and /x commands depend on the origin the wall is facing, so use the right ones.
Sorry I'm extremely tired and explained this very poorly