Raised This Month: $32 Target: $400
 8% 

Remove Beakables (Props, entities)


Post New Thread Reply   
 
Thread Tools Display Modes
lay295
Senior Member
Join Date: Sep 2013
Old 05-25-2015 , 16:09   Re: Remove Beakables (Props, entities)
Reply With Quote #11

PHP Code:
public OnEntityCreated(entity, const String:classname[]) { 
    if(
StrEqual(classname"func_breakable") || StrEqual(classname"func_breakable_surf")) {
        
SDKHook(entitySDKHook_SpawnHook_OnEntitySpawn); 
    } 

public 
Action:Hook_OnEntitySpawn(entity) { 
    
AcceptEntityInput(entity"Kill"); 
    return 
Plugin_Handled

Tested and working on Nuke and Office, taken from Mitchell

https://forums.alliedmods.net/showpo...33&postcount=4
__________________


Last edited by lay295; 05-25-2015 at 16:13.
lay295 is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 05-25-2015 , 16:55   Re: Remove Beakables (Props, entities)
Reply With Quote #12

Quote:
Originally Posted by Chdata View Post
you have to remove them at the start of every round
So I could use some OnRoundStart command instead of OnMapStart and then add every possible func_breakale_* to the list for the same script that thecount posted
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 05-25-2015 , 17:29   Re: Remove Beakables (Props, entities)
Reply With Quote #13

Quote:
Originally Posted by lay295 View Post
PHP Code:
public OnEntityCreated(entity, const String:classname[]) { 
    if(
StrEqual(classname"func_breakable") || StrEqual(classname"func_breakable_surf")) {
        
SDKHook(entitySDKHook_SpawnHook_OnEntitySpawn); 
    } 

public 
Action:Hook_OnEntitySpawn(entity) { 
    
AcceptEntityInput(entity"Kill"); 
    return 
Plugin_Handled

Tested and working on Nuke and Office, taken from Mitchell

https://forums.alliedmods.net/showpo...33&postcount=4
Maybe even

PHP Code:
public OnEntityCreated(entity, const String:classname[]) 

    if(
StrEqual(classname"func_breakable") || StrEqual(classname"func_breakable_surf")) 
    {
        return 
Plugin_Handled;
    } 

__________________

Last edited by Pelipoika; 05-25-2015 at 17:30.
Pelipoika is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 05-25-2015 , 17:57   Re: Remove Beakables (Props, entities)
Reply With Quote #14

Thx guys! It works perfectly!
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
0sama
Junior Member
Join Date: Oct 2011
Location: Argentina
Old 05-27-2015 , 13:03   Re: Remove Beakables (Props, entities)
Reply With Quote #15

I possible to remove also doors? like squeaky in Nuke or the doors in B bombsite? i try with func_door but don't work

Greetins.

Edit: Nvm, i can make it work adding also prop_door_rotating
__________________



__Web_

Last edited by 0sama; 05-27-2015 at 13:14.
0sama is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-27-2015 , 15:12   Re: Remove Beakables (Props, entities)
Reply With Quote #16

Quote:
Originally Posted by 0sama View Post
I possible to remove also doors? like squeaky in Nuke or the doors in B bombsite? i try with func_door but don't work

Greetins.

Edit: Nvm, i can make it work adding also prop_door_rotating
You need to be careful when removing doors as they may have associated areaportals. If you remove a door that's connected to a closed areaportal, you'll end up with a hall of mirrors effect.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
0sama
Junior Member
Join Date: Oct 2011
Location: Argentina
Old 05-27-2015 , 15:29   Re: Remove Beakables (Props, entities)
Reply With Quote #17

Quote:
Originally Posted by Powerlord View Post
You need to be careful when removing doors as they may have associated areaportals. If you remove a door that's connected to a closed areaportal, you'll end up with a hall of mirrors effect.
Yep i notice that in the map de_cache

Is not way to fix that no? only changing the map itself

Gretings.
__________________



__Web_
0sama is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 05-27-2015 , 15:38   Re: Remove Beakables (Props, entities)
Reply With Quote #18

Quote:
Originally Posted by 0sama View Post
Yep i notice that in the map de_cache

Is not way to fix that no? only changing the map itself

Gretings.
Instead of removing the doors why not just have them start open and then lock them.

https://developer.valvesoftware.com/wiki/Func_door Set the spawn flags to be 2049.
Darkness_ is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 05-28-2015 , 19:20   Re: Remove Beakables (Props, entities)
Reply With Quote #19

I'm terrible at sourcepawn. Could someone of you amazing people post a .sp file that includes all the stuff that have been mentioned here (remove breakables at every round, forcing doors to be open as default, etc..)

Sidenote; I'm also looking for a plugin to remove all weapons at the roundend, even equipped guns. Maybe this could be meshed ?
__________________
CAOSK-ESPORTS.COM

Last edited by Schpraaankiii; 05-28-2015 at 19:22.
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
lay295
Senior Member
Join Date: Sep 2013
Old 05-28-2015 , 23:26   Re: Remove Beakables (Props, entities)
Reply With Quote #20

Try this, not tested

PHP Code:
public OnEntityCreated(entity, const String:classname[]) { 
    if(
StrEqual(classname"func_breakable") || StrEqual(classname"func_breakable_surf") || StrEqual(classname"prop_door_rotating")) {
        
SDKHook(entitySDKHook_SpawnHook_OnEntitySpawn); 
    } 

public 
Action:Hook_OnEntitySpawn(entity) {
    
decl String:className[35]; 
    
GetEdictClassname(entityclassNamesizeof(className)); 
    if (
StrEqual(className"prop_door_rotating")) {
        
SetEntProp(entityProp_Data"m_fFlags"1);
    } else {
        
AcceptEntityInput(entity"Kill"); 
   }
    return 
Plugin_Handled

__________________

lay295 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:15.


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