Raised This Month: $51 Target: $400
 12% 

[CSGO]Auto Break prop_dynamic and func_breakable


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RoyZ
BANNED
Join Date: Oct 2019
Location: https://t.me/pump_upp
Old 02-09-2020 , 06:19   [CSGO]Auto Break prop_dynamic and func_breakable
Reply With Quote #1

I own a retakes server and now I want to automatically break all glass, iron plates, etc. before the start of each round
my code is
PHP Code:
int ent = -1;
    while ((
ent FindEntityByClassname(ent"func_breakable")) != -1
    {
        
AcceptEntityInput(ent"Break");
    }
    while ((
ent FindEntityByClassname(ent"prop_dynamic")) != -1
    {
        
AcceptEntityInput(ent"Break");
    }
    while ((
ent FindEntityByClassname(ent"prop_door_rotating")) != -1
    {
        
AcceptEntityInput(ent"open");
    } 
It worked but the problem is

Because Mirage B ’s bombsite shed also belongs to prop_dynamic, the code also breaks it.
So how can i just do not break the shed?

BTW:sry for my poor english If there are any grammar errors there
RoyZ is offline
Send a message via ICQ to RoyZ Send a message via AIM to RoyZ Send a message via Yahoo to RoyZ
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-09-2020 , 08:21   Re: [CSGO]Auto Break prop_dynamic and func_breakable
Reply With Quote #2

I don't play CSGO but maybe you can try to filter the hammerid of the entity (if it has one) or check if the model of the prop_dynamic is related to the Mirage B's bombsite, this is how I do in my plugins to exclude some entities.
You can go and also check the position of the entity and discard it from the FindEntityByClassname.

hammerid or position would be map based, then you would have to do different checks by map(or read it from a .txt file)
__________________
Marttt is online now
RoyZ
BANNED
Join Date: Oct 2019
Location: https://t.me/pump_upp
Old 02-16-2020 , 14:21   Re: [CSGO]Auto Break prop_dynamic and func_breakable
Reply With Quote #3

another bug in this code
in de_vertigo the toilet door will become transparent
my final code is
PHP Code:
while ((ent FindEntityByClassname(ent"func_breakable")) != -1
    {
        
AcceptEntityInput(ent"Break");
    }
    while ((
ent FindEntityByClassname(ent"prop_door_rotating")) != -1
    {
        
AcceptEntityInput(ent"open");
    }
    if (
StrContains(currentMap"de_mirage"false) == 1)
    {
        
ServerCommand("sv_cheats 1;ent_fire prop.breakable.01 break;ent_fire prop.breakable.02 break;sv_cheats 0");
    }
    else
    {
        if (
StrContains(currentMap"de_vertigo"false) == -1)
        { 
            while ((
ent FindEntityByClassname(ent"prop_dynamic")) != -1
               {
                  
AcceptEntityInput(ent"Break");
               }
            
        }
    } 
but the wooden window in de_mirage market can't be broke,I don't know if there is better code, the suggestion of the friend above is a bit too hard for me
RoyZ is offline
Send a message via ICQ to RoyZ Send a message via AIM to RoyZ Send a message via Yahoo to RoyZ
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 19:10.


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