Raised This Month: $ Target: $400
 0% 

block bomb drop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-07-2013 , 08:40   block bomb drop
Reply With Quote #1

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

__________________
Jhob94 is offline
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 11-07-2013 , 08:46   Re: block bomb drop
Reply With Quote #2

See if this helps ..

https://forums.alliedmods.net/showthread.php?t=40164
__________________
You keep bringing ANTICHRISTUS down .. He will rise again and kick asses !

#RespectList ANTICHRISTUS fysiks Bugsy

Most Common Errors You Can Encounter Every Now and Then
devilicioux is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-07-2013 , 08:49   Re: block bomb drop
Reply With Quote #3

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
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 11-07-2013 at 08:55. Reason: concmd not srvcmd
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-07-2013 , 12:06   Re: block bomb drop
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?p=1117804
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 23:19.


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