AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block bomb drop (https://forums.alliedmods.net/showthread.php?t=229414)

Jhob94 11-07-2013 08:40

block bomb drop
 
hi, i tried this but isnt working:
PHP Code:

public plugin_init()
{
    
register_clcmd("drop""block_drop")
}

public 
block_drop(id)
{
    new 
is_bomb[33]
    
is_bomb[id] = 0
    
    
if(get_user_weapon(id) == CSW_C4)
        
is_bomb[id] = 1
        
    
return is_bomb[id] ? PLUGIN_HANDLED PLUGIN_CONTINUE



devilicioux 11-07-2013 08:46

Re: block bomb drop
 
See if this helps ..

https://forums.alliedmods.net/showthread.php?t=40164

^SmileY 11-07-2013 08:49

Re: block bomb drop
 
PHP Code:

public plugin_init()
{
    
register_clcmd("drop""block_drop")
}

public 
block_drop(id)
{
    if(
get_user_weapon(id) == CSW_C4)
    {
         return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE


my bad, alternative tip

PHP Code:

public plugin_init()
{
    
register_clcmd("drop","block_drop"// if you tried as local game, try to register concmd!!!!
}

public 
block_drop(id)
{
    new 
szweapon[32];
    
read_args(szWeapon,charsmax(szWeapon));

    if(
equal(szWeapon,"weapon_c4"))
    {
         return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE


ps. or better, try some function using CS_InternalCommand

ConnorMcLeod 11-07-2013 12:06

Re: block bomb drop
 
http://forums.alliedmods.net/showthread.php?p=1117804


All times are GMT -4. The time now is 23:19.

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