No Spawn HE
#1
Buenas vengo esta ves a pedir ayuda con un plug-in
Un anti HE ya que re compran lo que sería la Granada HE y la tiran y recompran y tiran de nuevo.
Quisiera algo que bloqueara eso que solo la pueda comprar una ves por ronda.
Responder
#2
(12/02/2016, 09:58 AM)Manu escribió:
Código PHP:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define GetPlayerBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) )
#define SetPlayerBit(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) )
#define ClearPlayerBit(%1,%2) ( %1 &= ~( 1 << ( %2 & 31 ) ) )

const m_iId 43;
const 
m_iType 34;
const 
m_iMoney 115;
const 
ARMOURY_HEGRENADE 15;
const 
EXTRAOFFSET_WEAPONS 4;

new 
g_iBought;

public 
plugin_init( )
{
    
register_plugin"You will feel the pain""1.0""Manu" );
    
    
RegisterHamHam_Spawn"player""fw_PlayerSpawn_Post"true );
    
RegisterHamHam_AddPlayerItem"player""fw_PlayerItem_Pre"false );
}

public 
fw_PlayerSpawn_PostiId )
{
    
ClearPlayerBitg_iBoughtiId );
}

public 
fw_PlayerItem_PreiIndexiWeapon )
{
    if( 
get_pdata_intiWeaponm_iIdEXTRAOFFSET_WEAPONS ) == CSW_HEGRENADE )
    {
        if( 
GetPlayerBitg_iBoughtiIndex ) )
        {
            
client_printiIndexprint_center"* No puedes spammear granadas HE *" );
            
            
ExecuteHamBHam_TakeDamageiIndex0010.0DMG_NEVERGIB );
            
            
set_peviWeaponpev_flagspeviWeaponpev_flags ) | FL_KILLME );
            
            return 
HAM_SUPERCEDE;
        }
        else
            
SetPlayerBitg_iBoughtiIndex );
    }
    
    return 
HAM_IGNORED;

"Cada golpe es una lección, y cada lección te hace mejor."

[Imagen: b_350_20_000000_8a7300_ffffff_eeff00.png]
[Imagen: 76561198371193937.png]
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)