Raised This Month: $ Target: $400
 0% 

Real bombsites count


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-19-2014 , 11:27   Re: Real bombsites count
Reply With Quote #1

func_bomb_target is used to define a custom zone.

A bomb site can be defined either by func_bomb_target or info_bomb_target.

In case of de_torn, for each bomb site, it uses func_bomb_target to define custom zones. Technically you have 2 bomb sites, but here just that one bomb site is split in 3 custom zones and other one custom zone.

To fix that, you could check target of each entities. It should be different depending the bomb site. For example in de_torn, for site A, the three func_bomb_target have well the same target and for site B the other func_bomb_target has well a different one.
__________________

Last edited by Arkshine; 11-19-2014 at 11:30.
Arkshine is offline
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 11-20-2014 , 06:52   Re: Real bombsites count
Reply With Quote #2

Quote:
Originally Posted by Arkshine View Post
To fix that, you could check target of each entities. It should be different depending the bomb site. For example in de_torn, for site A, the three func_bomb_target have well the same target and for site B the other func_bomb_target has well a different one.

I do not understand. How to?
__________________
kiki33hun is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-20-2014 , 06:57   Re: Real bombsites count
Reply With Quote #3

Quote:
Originally Posted by kiki33hun View Post
I do not understand. How to?
Get the origins of the bombsites and check the distance between them.
But there are some maps that might have bombsites very close to each others so be careful what's the distance you check for consider it 1 site only.
__________________
Jhob94 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-20-2014 , 07:03   Re: Real bombsites count
Reply With Quote #4

Quote:
Originally Posted by kiki33hun View Post
I do not understand. How to?
Check pev_target.
__________________
Arkshine is offline
Old 11-20-2014, 07:34
kiki33hun
This message has been deleted by kiki33hun. Reason: i bad
kiki33hun
Veteran Member
Join Date: Jul 2011
Location: Magyarország
Old 11-21-2014 , 04:55   Re: Real bombsites count
Reply With Quote #6

Quote:
Originally Posted by Arkshine View Post
Check pev_target.
Okey, thanks. I need some help.

Plugin init:
PHP Code:
new ent = -1;
    while ((
ent find_ent_by_class(ent"func_bomb_target")))
    {
        
g_bombsitenum++
    }
    while ((
ent find_ent_by_class(ent"info_bomb_target")) )
    {
        
g_bombsitenum++
    } 
And new bomb site finder function:
PHP Code:
bomb_site_kereses(Float:locations[BOMBSITES][3]) 
{
    new 
entijentname[BOMBSITES][30], bool:lekerheto=false;
    while ( 
g_bombsitenum && (ent find_ent_by_class(ent,"func_bomb_target") ) || g_bombsitenum && (ent find_ent_by_class(ent,"info_bomb_target") )  ) 
    {
        
peventpev_targetentname[i], 29);
        
        for (; 
j<ij++)
        {
            if(!
equal(entname[i], entname[j])) 
            {
                
log_to_file("kiki.log""A %s nem egyezik a %s-el"entname[i], entname[j]);
                
lekerheto=true;    
            }
            else
            {
                
log_to_file("kiki.log""A %s egyezik a %s-el"entname[i], entname[j]);
                
lekerheto=false;
                
g_bombsitenum--;
                
log_to_file("kiki.log""Uj bombsitenum: %d"g_bombsitenum);
            }
        }
        
        
log_to_file("kiki.log""I: %d: %s"ientname[i]);
        if(
lekerhetoget_brush_entity_origin(entlocations[i]);
        
i++;
    }

Log:
L 11/21/2014 - 10:47:52: I: 0: squarebreak
L 11/21/2014 - 10:47:52: A templebreak nem egyezik a squarebreak-el
L 11/21/2014 - 10:47:52: I: 1: templebreak
L 11/21/2014 - 10:47:52: A squarebreak nem egyezik a templebreak-el
L 11/21/2014 - 10:47:52: I: 2: squarebreak
L 11/21/2014 - 10:47:52: A squarebreak egyezik a squarebreak-el
L 11/21/2014 - 10:47:52: Uj bombsitenum: 3
L 11/21/2014 - 10:47:52: I: 3: squarebreak

Problem: g_bombsitenum value is 3, if have 2 bombsite the map. Who the problem?
__________________
kiki33hun 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 17:39.


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