Raised This Month: $ Target: $400
 0% 

Block buy zone and can not take the weapon from the ground


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 04-09-2009 , 09:10   Block buy zone and can not take the weapon from the ground
Reply With Quote #1

EDIT: Theme name:
Block buy zone and can not take the weapon from the ground
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 04-09-2009 , 09:10   Re: Block buy zone and can not take the weapon from the ground
Reply With Quote #2

How to make that not be possible to take the weapon from the ground? and that they can not be to prohibit the purchase of a buy zone?
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-09-2009 , 21:36   Re: Block buy zone and can not take the weapon from the ground
Reply With Quote #3

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

public plugin_precache()
{
    
register_forward(FM_Spawn"fwd_spawn")
}

new const 
g_remove_entities[][] = 
{   
    
"func_buyzone"
}

public 
fwd_spawn(ent)
{
    if(!
pev_valid(ent)) 
        return 
FMRES_IGNORED
    
    
static classname[32]
    
pev(entpev_classnameclassname31)

    static 
i
    
for(0sizeof g_remove_entities; ++i)
    {
        if(
equal(classnameg_remove_entities[i]))
        {
            
engfunc(EngFunc_RemoveEntityent)
            return 
FMRES_SUPERCEDE
        
}
    }
    return 
FMRES_IGNORED

for remove the buyzone.
Anggara_nothing is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-09-2009 , 21:44   Re: Block buy zone and can not take the weapon from the ground
Reply With Quote #4

See this tutorial: http://forums.alliedmods.net/showthread.php?t=52679

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

#define PLUGIN "No ground weapon pickup"
#define VERSION "1.0"
#define AUTHOR "bugsy"

new g_MaxPlayers;

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_forward(FM_Touch,"fwTouch");
    
    
g_MaxPlayers get_maxplayers();
}

public 
fwTouchent id )
{
    if ( !( 
<= id <= g_MaxPlayers ) || !pev_valident ) || !( pevent pev_flags ) & FL_ONGROUND ) )
        return 
FMRES_IGNORED;
    
    
//This will block picking up all weapons except backpack (c4)

    
static szEntModel[32];
    
pevent pev_model szEntModel 31 );
    
    return 
equalszEntModel "models/w_backpack.mdl" ) ? FMRES_IGNORED FMRES_SUPERCEDE

__________________

Last edited by Bugsy; 04-10-2009 at 00:45.
Bugsy 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 02:15.


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