Raised This Month: $ Target: $400
 0% 

Only one Terrorist


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-21-2007 , 21:32   Re: Only one Terrorist
Reply With Quote #8

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.
__________________
alien is offline
Send a message via ICQ to alien
 



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 01:19.


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