Raised This Month: $ Target: $400
 0% 

Changing the max entity limit?


Post New Thread Reply   
 
Thread Tools Display Modes
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-08-2011 , 02:38   Re: Changing the max entity limit?
Reply With Quote #41

I take this chance to put here a non public plugin that I once made to prevent useless precaches.

Cvars:

Code:
precache_c4
precache_cz
precache_hl
precache_weapons
A cvar value 0 makes the plugin block that kind of stuff.
C4 is to block C4 stuff on maps without bombsite.
CZ is to block CZ stuff on CS.
HL is to block HL stuff. (made for CS)
Weapons is to block weapons that are restricted for the current map with the amxmodx feature to restrict (this takes 20 precaches for shield alone)
Attached Files
File Type: zip precache_control.zip (10.1 KB, 2897 views)
joaquimandrade is offline
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-08-2011 , 02:55   Re: Changing the max entity limit?
Reply With Quote #42

thanks for sharing
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-08-2011 , 02:58   Re: Changing the max entity limit?
Reply With Quote #43

Quote:
Originally Posted by Tirant View Post
thanks for sharing
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-08-2011 , 04:51   Re: Changing the max entity limit?
Reply With Quote #44

Your plugin is bad because you don't prevent the model be used. If a plugin gives a weapons or a user bypasses the restriction plugin (or others situations), it will nicely crash.
__________________

Last edited by Arkshine; 07-08-2011 at 04:53.
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-08-2011 , 05:07   Re: Changing the max entity limit?
Reply With Quote #45

Quote:
Originally Posted by Arkshine View Post
Your plugin is bad because you don't prevent the model be used. If a plugin gives a weapons or a user bypasses the restriction plugin (or others situations), it will nicely crash.
My plugin is imperfect, you meant!
I'm not interested in fix it but those cases can be easily prevented from the users of this plugin by removing the restriction of the weapon that can be used to crash. And even if this didn't work there were always the possibility of disabling precache blocking for weapons alone. So, the plugin is useful like it is.
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-08-2011 , 05:59   Re: Changing the max entity limit?
Reply With Quote #46

that's not about being perfect or not, it's about blocking properly a resource.

A map giving weapons -> crash.
A map with given weapons -> crash.
A plugin giving weapons -> crash.
Whatever the thing using with a weapon model -> crash.
And probably others situations not thought yet.

Yes, for the users, it will be so easy to prevent that...
__________________
Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-08-2011 , 06:25   Re: Changing the max entity limit?
Reply With Quote #47

Quote:
Originally Posted by Arkshine View Post
that's not about being perfect or not, it's about blocking properly a resource.

A map giving weapons -> crash.
A map with given weapons -> crash.
A plugin giving weapons -> crash.
Whatever the thing using with a weapon model -> crash.
And probably others situations not thought yet.

Yes, for the users, it will be so easy to prevent that...
It blocks precaches not loads. So it blocks properly what it is meant to block. If the owner of a server know it has maps that gives weapons that are restricted, he just has to remove the restrictions for them.

Anyway, with the plugin release it becomes easier to someone updating it and make it better. And people can benefit from it for normal cases. So, I prefer to let people enjoy it instead of having it taking dust.

If someone fixes it and wants to release it as a new plugin submission, feel free!
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-08-2011 , 06:34   Re: Changing the max entity limit?
Reply With Quote #48

The first line is a nice joke. Thanks for the laugh. Next makes sense and I'm done here.
__________________
Arkshine is offline
Calibras
BANNED
Join Date: Sep 2008
Old 04-24-2013 , 07:08   Re: Changing the max entity limit?
Reply With Quote #49

Quote:
Originally Posted by joropito View Post
I made this script to show how many entities are currently and what is the maximun number of entities.
It's showing in logs using server_print and every 2 seconds.

I made this for debugging purposes.

Just compile, install in plugins.ini and when you want to start entity count debugging, issue a "rcon amx_debug_ent" command.
If you send this command again, it will stop debugging.


In my case, adding "-num_edicts xxxx" to hlds_run (in linux) worked fine.
Also you can play with "-heapsize" and "-zone" options to manage memory limits.


Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>

#define DEBUG_PREFIX "[AMXX DEBUG]"

new gDebugEnt = 0

new iTaskEnt = 99921001

public plugin_init()
{
    register_plugin("Test Plugin", "0.1", "Piegtas")
    register_concmd("amx_debug_ent", "DebugEnt")
}

public DebugEnt()
{
    if(gDebugEnt)
    {
        remove_task(iTaskEnt)
        gDebugEnt = 0
        return
    }

    gDebugEnt = 1
    set_task(2.0, "ShowEntStats", iTaskEnt, "", 0, "b")
    return
}

public ShowEntStats()
{
    new iEntCount = entity_count()
    new iEntMax = global_get(glb_maxEntities)
    server_print("%s %d entities in world (%d max!)", DEBUG_PREFIX, iEntCount, iEntMax)
}
Thanks verry much, that plugin helped me somehow help to figure out whats the problem with the zp i would think so.
Calibras is offline
Send a message via Skype™ to Calibras
eduardolucioac
Member
Join Date: Jan 2016
Old 01-28-2017 , 19:23   Re: Changing the max entity limit?
Reply With Quote #50

Nice work!
eduardolucioac is offline
Reply



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 14:34.


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