Raised This Month: $ Target: $400
 0% 

Prevent func_buyzone creating


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 05-27-2010 , 05:44   Prevent func_buyzone creating
Reply With Quote #1

How to hook & prevent func_buyzone creating?

This doesn't work
PHP Code:
public plugin_precache()
    
g_fwSpawn register_forward(FM_Spawn"fw_Spawn");
    
// Entity Spawn Forward
public fw_Spawn(entity)
{
    
// Invalid entity
    
if (!pev_valid(entity)) return FMRES_IGNORED;
    
    
// Get classname
    
new Classname[32];
    
pev(entitypev_classnameClassnamesizeof Classname 1);
    
    
server_print("%s",Classname);
    
    if (
equal(Classname,"func_buyzone"))
    {
                       
// was never hooked
        
server_print("gg");
        
engfunc(EngFunc_RemoveEntityentity);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

PHP Code:
public plugin_precache()
    
register_forward(FM_KeyValue"Forward_KeyValue_Post"1);

public 
Forward_KeyValue_Post(entkvd_handle)
{   
    if (
pev_valid(ent))
    {
        new 
classname[32];
        
get_kvd(kvd_handleKV_ClassNameclassname31);
        
//server_print("KVD: %s",classname);
        
        
if (equal(classname"func_buyzone"))
        {
                                  
//was never hooked"
            
server_print("YESSS");
            if(
pev_valid(ent))
                
engfunc(EngFunc_RemoveEntityent);
        }
    } 
    return 
PLUGIN_CONTINUE;


Last edited by Empowers; 05-27-2010 at 05:56.
Empowers is offline
Send a message via ICQ to Empowers
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-27-2010 , 06:02   Re: Prevent func_buyzone creating
Reply With Quote #2

Read this:
http://forums.alliedmods.net/showthr...t=func_buyzone
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 05-27-2010 , 06:22   Re: Prevent func_buyzone creating
Reply With Quote #3

Thx man solved =)
Empowers is offline
Send a message via ICQ to Empowers
Reply


Thread Tools
Display Modes

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 05:18.


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