Raised This Month: $ Target: $400
 0% 

How to change range of mines


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 03:51   How to change range of mines
Reply With Quote #1

Hi!
I have mines on my server and I need to increase range of mines. I have that code to set mine and touch mine:
PHP Code:
public SetMine(id)
{
    if (!
Player_mines[id])
    {
        
ColorChat(id,GREEN"You have no mines to set!");
        return 
PLUGIN_CONTINUE;
    }
    
    
Player_mines[id]--;
    
    new 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);
    
    new 
ent create_entity("info_target");
    
entity_set_string(ent ,EV_SZ_classname"Mine");
    
entity_set_edict(ent ,EV_ENT_ownerid);
    
entity_set_int(entEV_INT_movetypeMOVETYPE_TOSS);
    
entity_set_origin(entorigin);
    
entity_set_int(entEV_INT_solidSOLID_BBOX);
    
    
entity_set_model(ent"models/mine.mdl");
    
entity_set_size(ent,Float:{-16.0,-16.0,0.0},Float:{16.0,16.0,2.0});
    
    
drop_to_floor(ent);
    
    
entity_set_float(ent,EV_FL_nextthink,halflife_time() + 0.01) ;
    
    
    return 
PLUGIN_CONTINUE;
}

public 
MineTouch(entid)
{
    new 
attacker entity_get_edict(entEV_ENT_owner);
    if (
get_user_team(attacker) != get_user_team(id))
    {
        new 
Float:fOrigin[3], iOrigin[3];
        
entity_get_vectorentEV_VEC_originfOrigin);
        
iOrigin[0] = floatround(fOrigin[0]);
        
iOrigin[1] = floatround(fOrigin[1]);
        
iOrigin[2] = floatround(fOrigin[2]);
        
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITYiOrigin);
        
write_byte(TE_EXPLOSION);
        
write_coord(iOrigin[0]);
        
write_coord(iOrigin[1]);
        
write_coord(iOrigin[2]);
        
write_short(sprite_blast);
        
write_byte(32); // scale
        
write_byte(20); // framerate
        
write_byte(0);// flags
        
message_end();
        new 
entlist[33];
        new 
numfound find_sphere_class(ent,"player"90.0 ,entlist32);
        
        for (new 
i=0numfoundi++)
        {        
            new 
pid entlist[i];
            
            if (!
is_user_alive(pid) || get_user_team(attacker) == get_user_team(pid))
                continue;
            
            
ExecuteHam(Ham_TakeDamagepidentattacker90.01);
        }
        
remove_entity(ent);
    }

Sorry for my not good English
CrazyChickenTest is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2010 , 09:17   Re: How to change range of mines
Reply With Quote #2

find_sphere_class -> change 90.0 by an higher value.
__________________
Arkshine is offline
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 09:35   Re: How to change range of mines
Reply With Quote #3

thx for help I will try it
CrazyChickenTest is offline
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 15:36   Re: How to change range of mines
Reply With Quote #4

sry for post after post but I set it to 300 and it doesn't work for me . Still range is the same as default ;/
__________________
Respect ;)
CrazyChickenTest is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2010 , 17:09   Re: How to change range of mines
Reply With Quote #5

range of what ? Explosion effect or the damage ?
__________________
Arkshine is offline
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 17:34   Re: How to change range of mines
Reply With Quote #6

range of touch mine
__________________
Respect ;)
CrazyChickenTest is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-16-2010 , 17:37   Re: How to change range of mines
Reply With Quote #7

So try to play in entity_set_size(). Like -32, -32 and 32 32 it will scale by 2 the mine's size.
__________________
Arkshine is offline
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 18:18   Re: How to change range of mines
Reply With Quote #8

thx very much
__________________
Respect ;)
CrazyChickenTest 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 07:13.


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