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

Exclude ladders from Entity Map Control


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Moonrider
New Member
Join Date: Oct 2021
Old 10-24-2021 , 06:55   Exclude ladders from Entity Map Control
Reply With Quote #1

Hello! I am using this plugin to remove some of the entities in maps.
However, this plugin removes the ladders models too. Is it possible to exclude the ladders from the plugin and leave them in maps?

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <engine>

#define PLUGIN ""
#define VERSION "0.0.1"
#define AUTHOR "SpeeDeeR@amxmodxbg"

new const skipp[][] = {
	"info_player_deathmatch",
	"info_player_start",
	"BCM_ServerFrame",
	"BCM_Hud"
};

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	new classname[32];
	
	new bool: skip;
	
	new count = 0;
	
	static victim =-1
	while((victim = engfunc(EngFunc_FindEntityInSphere, victim, Float:{0.0, 0.0, 0.0}, 10000.0))) 
	{
		pev(victim, pev_classname, classname, charsmax(classname));
		
		for(new i=0;i<sizeof(skipp);i++) {
			if(equal(skipp[i],classname))  {
				skip = true;
				break;
			}
		}
		
		if(!skip) {
			remove_entity(victim);
			
			count++;
		}
		
		skip = false;
	} 
	
	server_print("%d entities cleared!", count);
}
Thanks in advance!
Moonrider is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-24-2021 , 07:22   Re: Exclude ladders from Entity Map Control
Reply With Quote #2

Code:
new const skipp[][] = {     "info_player_deathmatch",     "info_player_start",     "BCM_ServerFrame",     "BCM_Hud",     "func_illusionary",     "func_ladder",     "func_wall" };
"func_illusionary" can be set to lava, slime, water, ladder so I put that in also.
__________________

Last edited by DJEarthQuake; 10-24-2021 at 14:32. Reason: wall
DJEarthQuake is offline
Moonrider
New Member
Join Date: Oct 2021
Old 10-24-2021 , 09:28   Re: Exclude ladders from Entity Map Control
Reply With Quote #3

Thank you very much! That was exactly what I needed.
Moonrider is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-24-2021 , 12:28   Re: Exclude ladders from Entity Map Control
Reply With Quote #4

You're welcome. Add to the list, as needed.
__________________
DJEarthQuake is offline
Moonrider
New Member
Join Date: Oct 2021
Old 10-24-2021 , 13:23   Re: Exclude ladders from Entity Map Control
Reply With Quote #5

It's weird tho on some maps (the default ones like nuke, inferno) the ladders are there but they are invisible.

in floppytown for example everything works fine. Am I missing something?
Moonrider is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-24-2021 , 14:10   Re: Exclude ladders from Entity Map Control
Reply With Quote #6

Try adding func_wall. De_inferno utilizes it a lot.
__________________

Last edited by DJEarthQuake; 10-24-2021 at 14:31. Reason: wall
DJEarthQuake is offline
Moonrider
New Member
Join Date: Oct 2021
Old 10-25-2021 , 12:54   Re: Exclude ladders from Entity Map Control
Reply With Quote #7

That was the case thanks! de_nuke and inferno use func_wall for their ladders I guess..
Thank you very much. Is there any source to look at all entity names and properties?

Thanks one more time!
Moonrider is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-26-2021 , 09:03   Re: Exclude ladders from Entity Map Control
Reply With Quote #8

Mappers have their reasons. Can go into the bsp with nano or edit.com <---that's not a WWW. Notepad is liable to toast the BSP. There are programs like entity info that can do this in-game by attacking the objects it dumps it in console. Can see it all without being in-game loading map with this in a separate log file.

Code:
#include amxmodx #include engine #include engine_stocks #define MAX_NAME_LENGTH 32 #define MAX_CMD_LENGTH 128 #define charsmin        -1 public plugin_init()register_plugin("Keyvalue logger", "1.0", ".sρiηX҉."); public pfn_keyvalue( ent ) {     new Classname[  MAX_NAME_LENGTH ], key[ MAX_NAME_LENGTH ], value[ MAX_CMD_LENGTH ]     copy_keyvalue( Classname, charsmax(Classname), key, charsmax(key), value, charsmax(value) )     log_to_file "map_ent_details.txt", "%s %s %s", Classname, key, value }
__________________
DJEarthQuake is offline
Reply


Thread Tools
Display Modes

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 11:32.


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