Raised This Month: $ Target: $400
 0% 

Bomb planting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 07-09-2007 , 23:41   Re: Bomb planting
Reply With Quote #1

k well how do i atlest make an ajustable square. when people enter it they will have godmode. ???
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 07-10-2007 , 01:01   Re: Bomb planting
Reply With Quote #2

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(PLUGINVERSIONAUTHOR);
    
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(idorigin3);
    
    
x1 origin[0];
    
client_print(0print_chat"X 1 = %d"x1);
    
    return 
PLUGIN_CONTINUE;
}

public 
getx2(id)
{
    new 
origin[3];
    
    
get_user_origin(idorigin3);
    
    
x2 origin[0];
    
client_print(0print_chat"X 2 = %d"x2);
    
    return 
PLUGIN_CONTINUE;
}

public 
gety1(id)
{
    new 
origin[3];
    
    
get_user_origin(idorigin3);
    
    
y1 origin[1];
    
client_print(0print_chat"Y 1 = %d"y1);
    
    return 
PLUGIN_CONTINUE;
}

public 
gety2(id)
{
    new 
origin[3];
    
    
get_user_origin(idorigin3);
    
    
y2 origin[1];
    
client_print(0print_chat"Y 2 = %d"y2);
    
    return 
PLUGIN_CONTINUE;
}

public 
getz1(id)
{
    new 
origin[3];
    
    
get_user_origin(idorigin3);
    
    
z1 origin[2];
    
client_print(0print_chat"Z 1 = %d"z1);
    
    return 
PLUGIN_CONTINUE;
}

public 
getz2(id)
{
    new 
origin[3];
    
    
get_user_origin(idorigin3);
    
    
z2 origin[2];
    
client_print(0print_chat"Z 2 = %d"z2);
    
    return 
PLUGIN_CONTINUE;
}

public 
showCenter(id)
{
    new 
xDisyDiszDis;
    new 
xyz;
    
    if(
x1 x2)
    {
        
xDis = (x1 x2) / 2;
        
x2 xDis;
    }
    else if(
x1 x2)
    {
        
xDis = (x2 x1) / 2;
        
x1 xDis;
    }
    else
    {
        
client_print(0print_chat"You must first get the X distances.");
        return 
PLUGIN_HANDLED;
    }
    
    if(
y1 y2)
    {
        
yDis = (y1 y2) / 2;
        
y2 yDis;
    }
    else if(
y1 y2)
    {
        
yDis = (y2 y1) / 2;
        
y1 yDis;
    }
    else
    {
        
client_print(0print_chat"You must first get the Y distances.");
        return 
PLUGIN_HANDLED;
    }
    
    if(
z1 z2)
    {
        
zDis = (z1 z2) / 2;
        
z2 zDis;
    }
    else if(
z1 z2)
    {
        
zDis = (z2 z1) / 2;
        
z1 zDis;
    }
    else
    {
        
client_print(0print_chat"You must first get the Z distances.");
        return 
PLUGIN_HANDLED;
    }
    
    
client_print(0print_chat"ENT COORDS = [X = %d] - [Y = %d] - [Z = %d]"xyz);
    
client_print(0print_chat"RADIUS' = [X = %d] - [Y = %d] - [Z = %d]"xDisyDiszDis);
    
    
// 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(entorigin);
    
    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_BROADCASTSVC_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

Last edited by hlstriker; 07-10-2007 at 01:13.
hlstriker 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 21:25.


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