Thread: pev_valid cache
View Single Post
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 07-11-2010 , 16:10   pev_valid cache
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define ENT_NUM 1024

new ent_valid[ENT_NUM]

public 
plugin_precache() {
    
register_forward(FM_CreateEntity,"ent_create")
    
register_forward(FM_CreateNamedEntity,"ent_create")
    
register_forward(FM_RemoveEntity,"ent_kill")    
}

public 
ent_create(ent)
    
ent_valid[ent] = true;
    
public 
ent_kill(ent)
    
ent_valid[ent] = false
Would such a caching work properly?

Last edited by Empowers; 07-11-2010 at 16:15.
Empowers is offline
Send a message via ICQ to Empowers