Well I just want to make simple walls with one color or a transparent box. I've been searching the forums and found this (edited a little):
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
public plugin_init() {
register_clcmd("create", "create")
}
public create(id) {
new sx[8], sy[8], sz[8]
new Float:origin[3]
read_argv(1,sx,7)
read_argv(2,sy,7)
read_argv(3,sz,7)
origin[0] = str_to_float(sx)
origin[1] = str_to_float(sy)
origin[2] = str_to_float(sz)
new ent = create_entity("info_target");
entity_set_string(ent, EV_SZ_classname, "safebox_blue");
entity_set_int(ent, EV_INT_solid, SOLID_BBOX);
entity_set_int(ent, EV_INT_movetype, MOVETYPE_FLY);
entity_set_origin(ent, origin);
new Float:mins[3] = {-255.0, -115.0, -71.0}
new Float:maxs[3] = {255.0, 115.0, 71.0}
entity_set_size(ent, mins, maxs);
mins[0] = origin[0] - 255.0;
mins[1] = origin[1] - 115.0;
mins[2] = origin[2] - 71.0;
maxs[0] = origin[0] + 255.0;
maxs[1] = origin[1] + 115.0;
maxs[2] = origin[2] + 71.0;
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(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(999999); // life in 0.1 s
write_byte(255); // r
write_byte(0); // g
write_byte(0); // b
message_end();
}
It creates a box with no walls, only the edges:
But the server crashes when I touch it or shoot at it.