Raised This Month: $ Target: $400
 0% 

block bomb drop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
^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
 



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