Raised This Month: $ Target: $400
 0% 

512 Model limit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 05-07-2010 , 17:13   512 Model limit
Reply With Quote #1

As this thread: http://forums.alliedmods.net/showthread.php?t=73238

How i can get the number of the current precached models including models precached by plugins?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 05-07-2010 , 17:26   Re: 512 Model limit
Reply With Quote #2

PHP 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

Not made by me!
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 05-07-2010 , 19:43   Re: 512 Model limit
Reply With Quote #3

Quote:
Originally Posted by Jelle View Post
Not made by me!
I made it but there's a lack of code there!

EDIT:

Here's the script http://forums.alliedmods.net/showpos...1&postcount=26

It only shows how many entities are in the map. Not precached resources.


EDIT2:

Make a plugin like this

- at precache, hook FM_PrecacheSound , FM_PrecacheModel , FM_PrecacheGeneric (all in post)
- at each call, check if the returned value are bigger than the previous (is a global variable to store it if it's bigger)
- at plugin_init unhook those forwards
- you will have in that global the last number like Arkshine said

I think it will work.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 05-07-2010 at 19:59.
joropito is offline
Send a message via MSN to joropito
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-07-2010 , 18:43   Re: 512 Model limit
Reply With Quote #4

precache_model() returns an index which is actually the number of precached model. If you see 240, it means you have precached the 240th model.
__________________
Arkshine 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 03:39.


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