AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block buy zone and can not take the weapon from the ground (https://forums.alliedmods.net/showthread.php?t=89676)

~Ice*shOt 04-09-2009 09:10

Block buy zone and can not take the weapon from the ground
 
EDIT: Theme name:
Block buy zone and can not take the weapon from the ground

~Ice*shOt 04-09-2009 09:10

Re: Block buy zone and can not take the weapon from the ground
 
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?

Anggara_nothing 04-09-2009 21:36

Re: Block buy zone and can not take the weapon from the ground
 
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.

Bugsy 04-09-2009 21:44

Re: Block buy zone and can not take the weapon from the ground
 
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




All times are GMT -4. The time now is 02:15.

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