But you're not deleting the flares. I updated my code before I even put it on the server.
class CProjectileFlare : public CEntity { public: //Declare our class. DECLARE_CLASS(CProjectileFlare, CEntity); virtual void Spawn ( void ); virtual void FlareThink ( void ); }; HOOK_ENTITY_CLASS (tf_projectile_flare, CProjectileFlare); void CProjectileFlare :: Spawn ( void ) { SetThink( &CProjectileFlare::FlareThink ); SetNextThink( gpGlobals->curtime + 10.0f ); } void CProjectileFlare :: FlareThink ( void ) { CPlayer *pPlayer = GetPlayerPointer( GetOwnerEntity() ); if(pPlayer) { pPlayer->m_iFlareCount++; if(pPlayer->m_iFlareCount >= 5) { g_Util.BanPlayer(pPlayer, NULL, "Exploit: Flare Exploit", -1); } } SetThink( &CProjectileFlare::Remove ); SetNextThink( gpGlobals->curtime + 0.1f ); } -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma Sent: Sunday, July 06, 2008 1:55 PM To: 'Half-Life dedicated Win32 server mailing list' Subject: Re: [hlds] Flare exploit on 2Fort Well as long as we're posting source code nobody can use... function fixflares() local flarecount = {} for _,e in pairs(ents.FindByClass("tf_projectile_flare")) do local flareowner = e:GetOwner() if(flareowner != nil) then local playerindex = flareowner:EntIndex() if(flarecount[playerindex] == nil) then flarecount[playerindex] = 1 else flarecount[playerindex] = flarecount[playerindex] + 1 end end end for k,v in pairs(flarecount) do if(v > 6) then local banplayer = player.GetByID(k) banplayer:BanByID(0, "Automatic ban for flare exploit") end end end timer.Create("flarefix", 10, 0, fixflares) Fixed via SourceOP Lua script ftw. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer 'voogru' MacDonald Sent: Sunday, July 06, 2008 1:36 AM To: 'Half-Life dedicated Win32 server mailing list' Subject: Re: [hlds] Flare exploit on 2Fort class CProjectileFlare : public CEntity { public: DECLARE_CLASS(CProjectileFlare, CEntity); virtual void Spawn ( void ); }; HOOK_ENTITY_CLASS(tf_projectile_flare, CProjectileFlare); void CProjectileFlare :: Spawn ( void ) { SetThink( &CProjectileFlare::Remove ); SetNextThink( gpGlobals->curtime + 1.5f ); } Fixed via plug-in ftw. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Coldorak Sent: Sunday, July 06, 2008 4:13 AM To: Half-Life dedicated Win32 server mailing list Subject: Re: [hlds] Flare exploit on 2Fort I got that with soldiers's rocket playing with around 20 bots on a local server On Sat, Jul 5, 2008 at 9:18 PM, Philip Bembridge <[EMAIL PROTECTED]> wrote: > I hvave got the flare thing to happen to me when I add too many bots {read > too much memory} if I create a server on my computer (in game) it also > happens with rockets > > 2008/7/5 P. Bhandal <[EMAIL PROTECTED]>: > > > Here's a fix: > > > > http://forums.alliedmods.net/showthread.php?p=647995 > > > > On Fri, Jul 4, 2008 at 11:52 PM, JDoc0512 <[EMAIL PROTECTED]> wrote: > > > > > man that's c00L > > > > > > --- On Sat, 7/5/08, P. Bhandal <[EMAIL PROTECTED]> wrote: > > > > > > From: P. Bhandal <[EMAIL PROTECTED]> > > > Subject: [hlds] Flare exploit on 2Fort > > > To: "Half-Life dedicated Win32 server mailing list" < > > > hlds@list.valvesoftware.com> > > > Date: Saturday, July 5, 2008, 12:35 AM > > > > > > I'm not sure whether this issue is limited to 2fort, but I've been > > > having > > > some problems with people coming onto my server and getting a ton of > > flares > > > stuck which ends up lagging the server out. Here's an example: > > > > > > http://upload.theqclan.com/2474995ctf_2fort0003.jpg > > > > > > Rebooting the server or changing the map fixes the issue. > > > _______________________________________________ > > > To unsubscribe, edit your list preferences, or view the list archives, > > > please > > > visit: > > > http://list.valvesoftware.com/mailman/listinfo/hlds > > > > > > > > > > > > _______________________________________________ > > > To unsubscribe, edit your list preferences, or view the list archives, > > > please visit: > > > http://list.valvesoftware.com/mailman/listinfo/hlds > > > > > _______________________________________________ > > To unsubscribe, edit your list preferences, or view the list archives, > > please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlds > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds