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

Replace Func_breakable with Func_wall


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
devu4
Member
Join Date: Apr 2012
Old 08-10-2013 , 13:18   Replace Func_breakable with Func_wall
Reply With Quote #1

Hello, I am trying to replace a breakable box in a map (jb_oasis) with a unbreakable box. I researched and came up with this from xPaws Deathrun Map fixer. Now I do not know how to replace the entites. The breakable box model = "func_breakable" "*148".

I would be grateful if someone could help me! so What I need is to replace the breakable box with a non-breakable box.

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>


public plugin_init( ) {
    
register_plugin"Maps Fixer""1.7""xPaw" );
    
    
register_cvar"deathrun_mapsfixer""1.7"FCVAR_SERVER FCVAR_SPONLY );
    
    new 
szMapname32 ];
    
get_mapnameszMapnamecharsmaxszMapname ) );
    
    if( 
equaliszMapname"jb_oasis" ) )
        
FixMap_oasis( );
}

FixMap_oasis( ) {





Last edited by devu4; 08-10-2013 at 13:43.
devu4 is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-10-2013 , 15:48   Re: Replace Func_breakable with Func_wall
Reply With Quote #2

PHP Code:
set_entities_unbreakable() {
    new 
ent;
    while( (
ent find_ent_by_class(ent"func_breakable")) ) {
        
entity_set_float(entEV_FL_takedamage0.0)
    }


Last edited by akcaliberg; 08-10-2013 at 15:48.
akcaliberg is offline
devu4
Member
Join Date: Apr 2012
Old 08-10-2013 , 18:11   Re: Replace Func_breakable with Func_wall
Reply With Quote #3

Quote:
Originally Posted by akcaliberg View Post
PHP Code:
set_entities_unbreakable() {
    new 
ent;
    while( (
ent find_ent_by_class(ent"func_breakable")) ) {
        
entity_set_float(entEV_FL_takedamage0.0)
    }

this is good, however I want a specific func_breakable to become unbreakable, not all the breakables on map.
devu4 is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 08-10-2013 , 18:32   Re: Replace Func_breakable with Func_wall
Reply With Quote #4

How specific ? What's your filter ?
akcaliberg is offline
devu4
Member
Join Date: Apr 2012
Old 08-10-2013 , 18:35   Re: Replace Func_breakable with Func_wall
Reply With Quote #5

Quote:
Originally Posted by akcaliberg View Post
How specific ? What's your filter ?
I want to replace func_breakable *148 only.

Last edited by devu4; 08-10-2013 at 18:36.
devu4 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-10-2013 , 18:39   Re: Replace Func_breakable with Func_wall
Reply With Quote #6

PHP Code:
new iEnt

iEnt 
find_ent_by_model(-1"func_breakable""*148"
And then you can dispatch it.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 08-11-2013 , 07:00   Re: Replace Func_breakable with Func_wall
Reply With Quote #7

i`m sorry i came here.. but i have a doubt too.
what means that "*148" parameter ?
red_bull2oo6 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-11-2013 , 12:00   Re: Replace Func_breakable with Func_wall
Reply With Quote #8

Each map has its own entity model number. With that number, you can simply edit that entity for example.

See here:

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 08-11-2013 , 13:06   Re: Replace Func_breakable with Func_wall
Reply With Quote #9

thanks that helped a lot!
red_bull2oo6 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 16:01.


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