I've come across a problem and recalled this topic.
Have you really tried to remove those entities? And if you did, what size of class_name array did you use? This is working to prevent terrorists from joining:
Code:
remove_terrorist_spawns()
{
new
entity_limit = get_global_int(GL_maxEntities);
entity_n = entity_count(),
class_name[32]; // DO NOT use 16 chars here as some people do!
for (new EID = get_maxplayers() + 1; EID <= _entity_limit; EID++)
{
if (is_valid_ent(EID))
{
entity_get_string(EID, EV_SZ_classname, class_name, sizeof(class_name) - 1);
if (!strcmp(class_name, "info_player_deathmatch")) remove_entity(EID);
}
}
return;
}
I saw someone using 16 bytes for class_name array ... changed all my arrays to size 16 thinking of sparing some little space. After that, it took me hour to figure out what's wrong as people were able to join terrorists. Then I thought that you might have been right ... but ... try it if you still didn't find your solution. It works for me.
__________________