Raised This Month: $ Target: $400
 0% 

[Req] Knife Only + HE


Post New Thread Reply   
 
Thread Tools Display Modes
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 08-16-2015 , 10:46   Re: [Req] Knife Only + HE
Reply With Quote #11

You can not avoid C4.
The only thing you can do is block players to set C4.
Krtola is offline
Send a message via Skype™ to Krtola
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-16-2015 , 11:10   Re: [Req] Knife Only + HE
Reply With Quote #12

Quote:
Originally Posted by Krtola View Post
You can not avoid C4.
The only thing you can do is block players to set C4.
Don't spread wrong information please. You can block c4 from being given to players.
__________________

Last edited by HamletEagle; 08-16-2015 at 11:10.
HamletEagle is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 08-16-2015 , 11:13   Re: [Req] Knife Only + HE
Reply With Quote #13

Then why do not you show how?
Krtola is offline
Send a message via Skype™ to Krtola
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-16-2015 , 11:18   Re: [Req] Knife Only + HE
Reply With Quote #14

The best way is to hook with orpheu CHalfLifeMultiplay::GiveC4 and supercede it.
__________________
HamletEagle is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-16-2015 , 11:29   Re: [Req] Knife Only + HE
Reply With Quote #15

You can also just remove the bombsites, then no one will be give the bomb. That's what I did and it WORKS, but the op must have tested it alone.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 08-16-2015 , 11:38   Re: [Req] Knife Only + HE
Reply With Quote #16

Any way..
Enjoy:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
#include <fun>

const XO_WEAPON 4

const m_pPlayer 41
const m_flNextPrimaryAttack 46

new bool:g_bCanPlantC4

public plugin_init()
{
    
register_plugin("C4 block""0.1""cs 1.6")
    
RegisterHam(Ham_Spawn"player""CBasePlayer_Spawn"true)
    
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_c4""CC4_PrimaryAttack")
}

public 
CC4_PrimaryAttack(iC4)
{
    if( !
g_bCanPlantC4 )
    {
        new 
id get_pdata_cbase(iC4m_pPlayerXO_WEAPON)
        
client_print(idprint_chat"C4 is actually disabled !!")
        
set_pdata_float(iC4m_flNextPrimaryAttack1.0XO_WEAPON)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED
}

public 
CBasePlayer_Spawn(id)
{
    if(
is_user_alive(id))
    {
        
strip_user_weaponsid )
        
give_item(id"weapon_knife")
        
        if(!
user_has_weapon(idCSW_HEGRENADE))
        {
            
give_item(id"weapon_hegrenade")
        }
    }

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
#include <fun>

public plugin_init()
{
    
register_plugin("c4 block""0.1""cs 1.6")
    
RegisterHam(Ham_Spawn"player""CBasePlayer_Spawn"true)
    
register_event("StatusIcon""GotBomb""be""1=1""1=2""2=c4")
}

public 
GotBomb(id
{
    
fm_strip_user_gun(idCSW_C4)
}

public 
CBasePlayer_Spawn(id)
{
    if(
is_user_alive(id))
    {
        
strip_user_weaponsid )
        
give_item(id"weapon_knife")
        
        if(!
user_has_weapon(idCSW_HEGRENADE))
        {
            
give_item(id"weapon_hegrenade")
        }
    }

Krtola is offline
Send a message via Skype™ to Krtola
Hartmann
Senior Member
Join Date: Nov 2014
Old 08-16-2015 , 12:15   Re: [Req] Knife Only + HE
Reply With Quote #17

Try...
- remove c4 from map
- remove buy
- equipment knife and hegrenade
PHP Code:
#include <amxmodx>
#include <engine>

public plugin_precache()
{
    new 
iEnt
    iEnt 
create_entity("game_player_equip")
    
DispatchKeyValue(iEnt"weapon_knife""1")
    
DispatchKeyValue(iEnt"weapon_hegrenade""1")
    
DispatchSpawn(iEnt)

    
iEnt create_entity("info_map_parameters")
    
DispatchKeyValue(iEnt"buying""3")
    
DispatchSpawn(iEnt)
}

public 
pfn_keyvalueiEnt 
{
    new 
szClassName[32], szKeyName[32], szValue[32]
    
copy_keyvalue(szClassNamecharsmax(szClassName), szKeyNamecharsmax(szKeyName), szValuecharsmax(szValue)) 
    if(    
equal(szClassName"game_player_equip")
    ||    
equal(szClassName"info_map_parameters")
    ||    
equal(szClassName"func_bomb_target")
    ||    
equal(szClassName"info_bomb_target")    )
    {
        
remove_entity(iEnt)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
plugin_cfg()
{
    
server_cmd("sv_restart 1")

__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann 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 17:31.


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