Raised This Month: $ Target: $400
 0% 

Create a room?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Simba
Junior Member
Join Date: Dec 2010
Old 07-28-2011 , 07:38  
Reply With Quote #1

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(entEV_SZ_classname"safebox_blue");
entity_set_int(entEV_INT_solidSOLID_BBOX);
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
entity_set_origin(entorigin);

new 
Float:mins[3] = {-255.0, -115.0, -71.0}
new 
Float:maxs[3] = {255.0115.071.0}

entity_set_size(entminsmaxs);

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_BROADCASTSVC_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.
Simba is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-28-2011 , 08:05   Re: Create a room?
Reply With Quote #2

Quote:
Originally Posted by Simba View Post
But the server crashes when I touch it or shoot at it.
Show us the think forward for the entity.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode