PHP Code:
public strip_spawns() {
new tspawns;
new ctspawns;
while((tspawns = engfunc(EngFunc_FindEntityByString, -1, "classname", "info_player_deathmatch")) !=0) {
engfunc(EngFunc_RemoveEntity, tspawns);
}
while((ctspawns = engfunc(EngFunc_FindEntityByString, -1, "classname", "info_player_start")) !=0) {
engfunc(EngFunc_RemoveEntity, ctspawns);
}
}
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.