View Single Post
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