Hey, i made a simple entity deleter (/clear) plugin.
and i tried to get the number of the entities that gets deleted.
I tried GetEntityCount() but its not working. it prints me huge number over 300000.
public Action Command_ClearMap(int client, int args)
int maxent = GetMaxEntities();
for (int i = MaxClients; i < maxent; i++)
if (IsValidEdict(i) && IsValidEntity(i))
GetEdictClassname(i, weapon, sizeof(weapon));
if ((StrContains(weapon, "weapon_") != -1 || StrContains(weapon, "item_") != -1) && GetEntDataEnt2(i, g_WeaponParent) == -1)
PrintToChatAll("%s The map has been cleared, \x02%d\x01 Items deleted.", PREFIX, ...);