Raised This Month: $ Target: $400
 0% 

Stop this while loop?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 03-31-2009 , 23:02   Stop this while loop?
Reply With Quote #1

PHP Code:
public strip_spawns() {
        new 
tspawns;
        new 
ctspawns;
        while((
tspawns engfunc(EngFunc_FindEntityByString, -1"classname""info_player_deathmatch")) !=0) {
            
engfunc(EngFunc_RemoveEntitytspawns);
        }
        while((
ctspawns engfunc(EngFunc_FindEntityByString, -1"classname""info_player_start")) !=0) {
            
engfunc(EngFunc_RemoveEntityctspawns);
        }

How do I make the loop stop after it deletes the last spawn?

After my plugin deletes the old spawns, it creates the new spawns in my new locations, but they are still being deleted by the loop.
VMAN is offline
 


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 02:17.


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