Raised This Month: $12 Target: $400
 3% 

Solved error 020: invalid symbol name ""


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-30-2021 , 13:08   error 020: invalid symbol name ""
Reply With Quote #1

PHP Code:
   /* - - - - - - - - - - -

        AMX Mod X script.

          | Author  : Arkshine
          | Plugin  : WPN Squeak Grenade
          | Version : v1.0.6 - without WM.

        (!) Support : http://forums.alliedmods.net/showthread.php?t=93659
        (!) Version without WeaponMod required and for Zombie Plague.
        
        This program is free software; you can redistribute it and/or modify it
        under the terms of the GNU General Public License as published by the
        Free Software Foundation; either version 2 of the License, or (at
        your option) any later version.

        This program is distributed in the hope that it will be useful, but
        WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
        General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software Foundation,
        Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

        ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~


        Description :
        - - - - - - -
            Basically, it's almost the same weapon that you can see in Half-life 1.

            Snarks are small, red, and bulbous, with a large (in relation to body porportion) 
            single green eye and a large pincer-like mandible. Snarks are normally calm creatures 
            that show little signs of intelligence, but if they see any living creature other
            than another Snark, they immediately begin to attack it. They attack aggressively, 
            persistently, and erratically, leaping and biting at their target.

            A full description can be found here : http://half-life.wikia.com/wiki/Snark .


        Requirement :
        - - - - - - -
            * CS 1.6 / CZ.
            * AMX Mod X 1.8.x or higher.


        Changelog :
        - - - - - -
            v1.0.6 : [ 11 jul 2009 ]

                (+) Initial release.

                
        Credits :
        - - - - -
            * HLSDK
            * DevconeS
            * VEN
            * Sproily ( Alternative models )

    - - - - - - - - - - - */
    
    #include <amxmodx>
    #include <fakemeta>
    #include <cstrike>
    #include <hamsandwich>
    #include <engine>
    #include <fun>
    #include <zombieplague>

    
    #define Plugin   "[ZP] Extra: Squeak Grenade"
    #define Version  "1.0.6-wwm"
    #define Author   "Arkshine"
    
    
    // --| Zombie Plaque: Extra item configuration.
    #define ZP_EXTRA_ITEM_NAME  "Snark INFECTOR"
    #define ZP_EXTRA_ITEM_COST  14

    // --| Comment if you want to use the default model from valve.
    #define ALTERNATIVE_MODEL

    // --| Snark trail.
    #define TRAIL_LIFE        40    // Life
    #define TRAIL_WIDTH       4     // Width
    #define TRAIL_RED         10    // Red
    #define TRAIL_GREEN       224   // Red
    #define TRAIL_BLUE        10    // Green
    #define TRAIL_BRIGTHNESS  200   // Blue
    
     /* - - -
     |  WEAPON MODELS  |
                 - - - */
        #if !defined ALTERNATIVE_MODEL
            
new const gModel_P[] = "models/p_squeak.mdl";
            new const 
gModel_V[] = "models/v_squeak.mdl";
        
#else
            
new const gModel_P[] = "models/p_alt_squeak.mdl";
            new const 
gModel_V[] = "models/v_alt_squeak_gflip.mdl";
        
#endif

    /* - - -
     |  SNARK SOUNDS  |
                - - - */
            
new const gSnarkHunt1Sound    [] = "squeek/sqk_hunt1.wav";
            new const 
gSnarkHunt2Sound    [] = "squeek/sqk_hunt2.wav";
            new const 
gSnarkHunt3Sound    [] = "squeek/sqk_hunt3.wav";
            new const 
gSnarkDieSound      [] = "squeek/sqk_die1.wav";
            new const 
gSnarkAttackSound   [] = "squeek/sqk_deploy1.wav";
            new const 
gSnarkBlastSound    [] = "weapons/sqk_blast2.wav";
            new const 
gSnarkBodySplatSound[] = "common/bodysplat.wav";

    
/* - - -
     |  SNARK MODEL  |
               - - - */
        
new
        
#if !defined ALTERNATIVE_MODEL
            
gSnarkModel[] = "models/w_squeak.mdl";
        
#else
            
gSnarkModel[] = "models/w_alt_squeak.mdl";
        
#endif

    /* - - -
     |    SEQUENCE   |
               - - - */
        
enum
        
{
            
wsqueak_idle1,
            
wsqueak_fidget,
            
wsqueak_jump,
            
wsqueak_run
        
};

        
enum
        
{
            
squeak_idle1,
            
squeak_fidgetfit,
            
squeak_fidgetnip,
            
squeak_down,
            
squeak_up,
            
squeak_throw
        
};

    
/* - -
     |  CONSTANTS  |
               - - */
        
const BLOOD_COLOR_RED        247;
        const 
BLOOD_COLOR_YELLOW     195;
               
        const 
MAX_CLIENTS            32;
        const 
MAX_KNIFE_MODEL_LENGTH 128;
        const 
NONE                   = -1;
        const 
NULL_ENT               0;

        
enum _:Coord_e
        
{
            
Float:x,
            
Float:y,
            
Float:z
        
};

        
enum _:Angle_e
        
{
            
Float:Pitch,
            
Float:Yaw,
            
Float:Roll
        
};

        
enum
        
{
            
HuntThink 1,
            
SuperBounceTouch,
            
RemoveSnark
        
};

        new const 
Float:gHullMin    Coord_e ] = { -16.0, -16.0, -36.0 };
        new const 
Float:gDuckHullMinCoord_e ] = { -16.0, -16.0, -18.0 };

        new const 
gWeaponCommand [] = "weapon_hegrenade";
        new const 
gWeaponIndex      CSW_HEGRENADE;

        new const 
gGenericEntity [] = "info_target";
        new const 
gSnarkClassName[] = "wpn_snark";

     
/* - - - -
     |  PLAYER/WEAPON OFFSETS  |
                       - - - - */
        
const m_flNextAttack        83    // Player.
        
const m_pActiveWeapon       373;  // Player.
        
const m_pPlayer             41;   // Weapon.
        
const m_flNextPrimaryAttack 46;   // Weapon.

    /* - - -
     |  CUSTOM FIELD  |
                - - - */
        #define pev_NextHunt            pev_fuser1
        #define pev_NextBounceSoundTime pev_fuser2
        #define pev_NextHit             pev_fuser3
        #define pev_NextAttack          pev_fuser4
        #define pev_DetonateDelay       pev_ltime
        #define pev_RealOwner           pev_iuser1
        #define pev_Remove              pev_iuser2
        #define pev_EnemyTarget         pev_vuser1
        #define pev_PosPrev             pev_vuser2

    /* - - -
     |  CVAR POINTER  |
                - - - */
        
new pCvarAmmo;
        new 
pCvarRefireRate;
        new 
pCvarHealth;
        new 
pCvarVelocity;
        new 
pCvarDamagePop;
        new 
pCvarDamageRadius;
        new 
pCvarGravity;
        new 
pCvarFriction;
        new 
pCvarDetonateDelay;
        new 
pCvarFieldOfView;
        new 
pCvarShowTrail;

    
/* - - - -
     |  SPRITES/MODELS INDEX  |
                      - - - - */
        
new gBloodSpray;
        new 
gBloodDrop;
        new 
gSmokeTrail;

    
/* - - - -
     |  OTHERS STUFFS  |
                 - - - */
        
new bool:gHasSnark    MAX_CLIENTS 1 char ];
        new 
bool:gWeaponActiveMAX_CLIENTS 1 char ];
        new 
bool:gJustThrown  MAX_CLIENTS 1 char ];

        new 
Float:gNextShot      MAX_CLIENTS ];
        new 
Float:gTimeWeaponIdleMAX_CLIENTS ];

        new 
gPlayerAmmoMAX_CLIENTS 1 char ];

        new const 
gSnarkHealthReference 10000;
        new 
gSnarkClassNameReference;
        new 
gMaxEntities;
        new 
gMaxClients;
        new 
gMsgidAmmoX;
        new 
gSnarInfector;
        new 
bool:armor[33],bool:is_alive[33],bool:is_connected[33],bool:is_bot[33],g_MaxPlayers;
    
/* - -
     |  MACROS  |
            - - */
        #define VectorSubtract(%1,%2,%3)  ( %3[ x ] = %1[ x ] - %2[ x ], %3[ y ] = %1[ y ] - %2[ y ], %3[ z ] = %1[ z ] - %2[ z ] )
        #define VectorAdd(%1,%2,%3)       ( %3[ x ] = %1[ x ] + %2[ x ], %3[ y ] = %1[ y ] + %2[ y ], %3[ z ] = %1[ z ] + %2[ z ] )
        #define VectorCopy(%1,%2)         ( %2[ x ] = %1[ x ],  %2[ y ] = %1[ y ], %2[ z ] = %1[ z ] )
        #define VectorScale(%1,%2,%3)     ( %3[ x ] = %2 * %1[ x ], %3[ y ] = %2 * %1[ y ], %3[ z ] = %2 * %1[ z ] )
        #define VectorMA(%1,%2,%3,%4)     ( %4[ x ] = %1[ x ] + %2 * %3[ x ], %4[ y ] = %1[ y ] + %2 * %3[ y ], %4[ z ] = %1[ z ] + %2 * %3[ z ] )
        #define VectorMS(%1,%2,%3,%4)     ( %4[ x ] = %1[ x ] - %2 * %3[ x ], %4[ y ] = %1[ y ] - %2 * %3[ y ], %4[ z ] = %1[ z ] - %2 * %3[ z ] )
        #define VectorLength(%1)          ( floatsqroot ( %1[ x ] * %1[ x ] + %1[ y ] * %1[ y ] + %1[ z ] * %1[ z ] ) )
        #define VectorEqual(%1,%2)        ( %1[ x ] == %2[ x ] && %1[ y ] == %2[ y ] && %1[ z ] == %2[ z ] )
        #define DotProduct(%1,%2)         ( %1[ x ] * %2[ x ]+ %1[ y ] * %2[ y ] + %1[ z ] * %2[ z ] )

        #define message_begin_f(%1,%2,%3) ( engfunc ( EngFunc_MessageBegin, %1, %2, %3 ) )
        #define write_coord_f(%1)         ( engfunc ( EngFunc_WriteCoord, %1 ) )

        //connect valid?
        #define is_user_valid_connected(%1) (1 <= %1 <= g_MaxPlayers && is_connected[%1])
    
    
public plugin_precache ()
    {
        
// --| Weapon models.
        
precache_modelgModel_P );
        
precache_modelgModel_V );

        
// --| Snark model.
        
precache_modelgSnarkModel );

        
// --| Snark sounds.
        
precache_soundgSnarkBlastSound );
        
precache_soundgSnarkBodySplatSound );
        
precache_soundgSnarkDieSound );
        
precache_soundgSnarkHunt1Sound );
        
precache_soundgSnarkHunt2Sound );
        
precache_soundgSnarkHunt3Sound );
        
precache_soundgSnarkAttackSound );

        
gBloodSpray precache_model"sprites/bloodspray.spr" );   // initial blood
        
gBloodDrop  precache_model"sprites/blood.spr" );        // splattered blood
    
}

    
    public 
plugin_init ()
    {
        
register_pluginPluginVersionAuthor );
        
register_cvar"zp_snark_version"VersionFCVAR_SERVER FCVAR_SPONLY );

        
gSnarInfector zp_register_extra_itemZP_EXTRA_ITEM_NAMEZP_EXTRA_ITEM_COSTZP_TEAM_ZOMBIE );
        
g_MaxPlayers get_maxplayers()
        
        
pCvarAmmo          register_cvar"wpn_sg_ammo"           "5"   );
        
pCvarRefireRate    register_cvar"wpn_sg_refire_rate"    "0.3" );
        
pCvarHealth        register_cvar"wpn_sg_health"         "10"  );
        
pCvarVelocity      register_cvar"wpn_sg_velocity"       "5" );
        
pCvarDamagePop     register_cvar"wpn_sg_damage_pop"     "10"   );
        
pCvarDamageRadius  register_cvar"wpn_sg_damage_radius"  "15"  );
        
pCvarGravity       register_cvar"wpn_sg_gravity"        "0.5" );
        
pCvarFriction      register_cvar"wpn_sg_friction"       "0.5" );
        
pCvarDetonateDelay register_cvar"wpn_sg_detonate_delay" "15"  );
        
pCvarFieldOfView   register_cvar"wpn_sg_fov"            "0"   );
        
pCvarShowTrail     register_cvar"wpn_sg_show_trail"     "1"   );

        
RegisterHamHam_Item_Deploy gWeaponCommand"CSqueak_Deploy");
        
RegisterHamHam_Item_HolstergWeaponCommand"CSqueak_Holster");
        
RegisterHamHam_TakeDamagegGenericEntity"CSqueak_TakeDamage");
        
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
        
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
        
register_forward(FM_ClientDisconnect"fw_ClientDisconnect")
        
register_forwardFM_CmdStart"CSqueak_HookButtons" );
        
register_forwardFM_PlayerPreThink"CSqueak_WeaponIdle" );

        
register_thinkgSnarkClassName"CSqueak_HuntThink" );
        
register_touchgSnarkClassName"*""CSqueak_SuperBounceTouch" );

        
// register_clcmd( "say test", "CSqueak_GiveWeapon" );

        
gMaxEntities global_getglb_maxEntities );
        
gMaxClients  global_getglb_maxClients );
        
        
gSnarkClassNameReference engfuncEngFunc_AllocStringgSnarkClassName );
        
gMsgidAmmoX get_user_msgid"AmmoX" );

        if ( 
get_pcvar_numpCvarShowTrail ) )
        {
            
gSmokeTrail engfuncEngFunc_PrecacheModel"sprites/smoke.spr" );
        }
    }

    
// Client joins the game
    
public client_putinserver(id)
    {
        
// Player joined
        
is_connected[id] = true
        
if (!is_user_bot(id)){
            
is_bot[id] = false
        
}else{
            
is_bot[id] = true
    
}
    }
    
    
// Client leaving
    
public fw_ClientDisconnect(id)
    {
        
is_connected[id] = false
        is_alive
[id] = false
    
}
    public 
fw_PlayerSpawn_Post(id)
    {
        
// Not alive or didn't join a team yet
        
if (!is_user_alive(id) || !cs_get_user_team(id))
            return;
        
// Player spawned
        
is_alive[id] = true
    
}
    public 
fw_PlayerKilled(victimattackershouldgib)
    {
        
//player die
        
is_alive[victim] = false
    
}

    public 
zp_extra_item_selected PlayerItemId )
    {
        if ( 
ItemId == gSnarInfector )
        {
            
CSqueak_GiveWeapon Player );
        }
    }
    
    
    public 
zp_round_ended WinTeam )
    {
        new 
Snark = -1;
        
        while ( ( 
Snark find_ent_by_classSnarkgSnarkClassName ) ) != NULL_ENT )
        {
            
CSqueak_Killed Snark0true );
        }
        
        for ( new 
Player 1Player <= gMaxClientsPlayer++ )
        {
            
CheckAndRemoveWeapon Player );
        }
    }
    
    
    public 
zp_round_started GameModPlayer )
    {
        if(
is_bot[Player] || !is_alive[Player] || !cs_get_user_team(Player) ) return PLUGIN_CONTINUE
        
if ( !zp_get_user_zombiePlayer ) )
        {
            
CheckAndRemoveWeapon Player );
        }
        return 
PLUGIN_CONTINUE
    
}
    
    
    
    public 
zp_user_humanized_prePlayerSurvivor )
    {
        
CheckAndRemoveWeapon Player );
    }
    
    
    
stock CheckAndRemoveWeapon ( const Player )
    {
        if ( 
user_has_weaponPlayergWeaponIndex ) )
        {
            
RemoveWeapon Playerget_user_weaponPlayer ) == gWeaponIndex 
                
                
get_pdata_cbasePlayerm_pActiveWeapon ) : 
                
find_ent_by_owner ( -1gWeaponCommandPlayer ) );
        }
        return 
PLUGIN_CONTINUE
    
}

    
    public 
client_connect Player )
    {
        
gHasSnark    Player } = false;
        
gWeaponActivePlayer } = false;
        
gJustThrown  Player } = false;
        
gPlayerAmmo  Player } = get_pcvar_numpCvarAmmo );
    }


    public 
CSqueak_GiveWeapon( const Player )
    {
        
gHasSnarkPlayer } = true;
        
gPlayerAmmoPlayer } = get_pcvar_numpCvarAmmo );

        
give_itemPlayergWeaponCommand );
        
engclient_cmdPlayergWeaponCommand );
    }


    public 
CSqueak_PrimaryAttack ( const Player )
    {
        static 
Float:VAngle     Angle_e ];
        static 
Float:Origin     Coord_e ];
        static 
Float:TraceOriginCoord_e ];
        static 
Float:Forward    Coord_e ];
        static 
Float:Start      Coord_e ];
        static 
Float:End        Coord_e ];
        static 
Float:EndPos     Coord_e ];
        static 
Float:Velocity   Coord_e ];
        static 
Float:Fraction;

        if ( 
gPlayerAmmoPlayer } )
        {
            if ( 
pevPlayerpev_waterlevel ) >= )
            {
                
emit_soundPlayerCHAN_WEAPONgSnarkDieSoundVOL_NORMATTN_NORM0PITCH_NORM );
                
gNextShotPlayer ] = get_gametime() + get_pcvar_floatpCvarRefireRate );
                return 
PLUGIN_HANDLED;
            }

            
pevPlayerpev_originOrigin );
            
pevPlayerpev_v_angleVAngle );
            
pevPlayerpev_velocityVelocity );

            
engfuncEngFunc_MakeVectorsVAngle );

            
VectorCopyOriginTraceOrigin );

            if ( 
pevPlayerpev_flags ) & FL_DUCKING )
            {
                
TraceOrigin] = TraceOrigin] - ( gHullMin] - gDuckHullMin] );
                
TraceOrigin] = TraceOrigin] - ( gHullMin] - gDuckHullMin] );
                
TraceOrigin] = TraceOrigin] - ( gHullMin] - gDuckHullMin] );
            }

            
global_getglb_v_forwardForward );

            
VectorMA TraceOrigin20.0ForwardStart );
            
VectorMA TraceOrigin64.0ForwardEnd );

            
engfuncEngFunc_TraceLineStartEndDONT_IGNORE_MONSTERSNULL_ENT);

            
get_tr20TR_FractionFraction );
            
get_tr20TR_vecEndPosEndPos );

            if ( !
get_tr20TR_AllSolid ) && !get_tr20TR_StartSolid ) && Fraction 0.25 )
            {
                
// --| Play the throw animation.
                
UTIL_PlayWeaponAnimation Playersqueak_throw );

                
// --| player "shoot" animation
                //

                
VectorMA Velocityget_pcvar_floatpCvarVelocity ), ForwardVelocity );

                if ( 
CSqueak_Create PlayerEndPosVAngleVelocity ) )
                {
                    new 
Float:CurrentTime get_gametime();

                    switch ( 
random_num0) )
                    {
                        case 
0emit_soundPlayerCHAN_WEAPONgSnarkHunt1SoundVOL_NORMATTN_NORM0PITCH_NORM );
                        case 
1emit_soundPlayerCHAN_WEAPONgSnarkHunt2SoundVOL_NORMATTN_NORM0PITCH_NORM );
                        case 
2emit_soundPlayerCHAN_WEAPONgSnarkHunt3SoundVOL_NORMATTN_NORM0PITCH_NORM );
                    }

                    
gPlayerAmmoPlayer }--;
                    
gJustThrownPlayer } = true;
                    
                    
UpdateHud Player );

                    
gNextShotPlayer ] = CurrentTime get_pcvar_floatpCvarRefireRate );
                    
gTimeWeaponIdlePlayer ] = CurrentTime 1.0;

                    return 
PLUGIN_CONTINUE;
                }
            }
        }

        return 
PLUGIN_HANDLED;
    }


    public 
CSqueak_Deploy ( const Weapon )
    {
        
// --| Get the knife's owner index.
        
new Player get_pdata_cbaseWeaponm_pPlayer);

        if ( 
Player && gHasSnarkPlayer } )
        {
            
// --| Change knife to snark weapon.
            
ChangeWeaponToSnark Player );

            
// --| Play the deploy animation.
            
UTIL_PlayWeaponAnimation Playersqueak_up );
            
emit_sound WeaponCHAN_VOICE random_float 0.01.0 ) <= 0.5 gSnarkHunt2Sound gSnarkHunt3SoundVOL_NORMATTN_NORM0PITCH_NORM );

            
// --| Block the primary attack.
            
set_pdata_floatWeaponm_flNextPrimaryAttack9999.0);
            
set_pdata_floatPlayerm_flNextAttack9999.0 );
            
            
// --| Update Ammo on HUD.
            
UpdateHud Player );

            
// --| We are holding the weapon.
            
gWeaponActivePlayer } = true;
        }
    }


    public 
CSqueak_Holster ( const Weapon )
    {
        
// --| Get the knife's owner index.
        
new Player get_pdata_cbaseWeaponm_pPlayer);

        if ( 
Player && gHasSnarkPlayer } && gWeaponActivePlayer } )
        {
            
// --| We are not holding the weapon anymore.
            
gWeaponActivePlayer } = false;
            
set_pdata_floatPlayerm_flNextAttackget_gametime() + 0.5 );

            if ( !
gPlayerAmmoPlayer } && user_has_weaponPlayergWeaponIndex ) )
            {
                
RemoveWeapon Playerget_pdata_cbasePlayerm_pActiveWeapon ) );
            }
            else
            {
                
// --| Play the holster animation.
                
UTIL_PlayWeaponAnimation Playersqueak_down );
                
emit_soundPlayerCHAN_WEAPON"common/null.wav"VOL_NORMATTN_NORM0PITCH_NORM );
            }
        }
    }


    public 
CSqueak_Killed ( const Snark, const Killer, const bool:ShouldGib )
    {
        new 
Float:DirectionCoord_e ];
        new 
Float:Origin   Coord_e ];

        
pevSnarkpev_originOrigin );

        
set_pevSnarkpev_model);
        
set_pevSnarkpev_RemoveRemoveSnark );
        
set_pevSnarkpev_DetonateDelayget_gametime() + 0.1 );

        
set_pevSnarkpev_takedamageDAMAGE_NO );

        
emit_soundSnarkCHAN_ITEMgSnarkBlastSoundVOL_NORMATTN_NORM 20PITCH_NORM );
        
emit_soundSnarkCHAN_VOICEgSnarkBodySplatSound0.75ATTN_NORM0PITCH_NORM );

        
UTIL_RandomBloodVectorDirection );
        
        
FX_BloodDrips OriginBLOOD_COLOR_YELLOW, .Amount 60 );
        
FX_StreakSplash OriginDirection, .Color 5, .Count 16, .Speed 50, .VelocityRange 200 );
        
        
UTIL_RadiusDamage OriginSnarkpevSnarkpev_RealOwner ), get_pcvar_floatpCvarDamagePop ), get_pcvar_floatpCvarDamageRadius ), DMG_BLAST );
    }

    
    
/* public CZombie_Killed ( const Zombie, const Human, const bool:ShouldGid )
    {
        if ( zp_get_user_zombie( Zombie ) && gHasSnark{ Zombie } )
        {
            
        }
    } */
    

    
public CSqueak_TakeDamage ( const Snark, const Inflictor, const Attacker, const Float:Damage, const DamageBits )
    {
        if ( 
is_valid_entSnark ) && pevSnarkpev_groupinfo ) == gSnarkClassNameReference )
        {
            if ( 
pevSnarkpev_health ) - gSnarkHealthReference <= )
            {
                
CSqueak_Killed SnarkAttacker, .ShouldGib true );
            }
        }
    }

    
    public 
CSqueak_HookButtons ( const Player, const UC_Handle, const Seed )
    {
        static 
Float:CurrentTime;
        static 
Buttons;

        if ( 
gHasSnarkPlayer } && gWeaponActivePlayer } && ( Buttons get_ucUC_HandleUC_Buttons ) ) & IN_ATTACK )
        {
            
CurrentTime get_gametime();

            if ( 
gNextShotPlayer ] > CurrentTime )
            {
                return 
FMRES_HANDLED;
            }
            
            if ( 
CSqueak_PrimaryAttack Player ) == PLUGIN_HANDLED )
            {
                return 
FMRES_HANDLED;
            }

            
set_ucUC_HandleUC_ButtonsButtons & ~IN_ATTACK );
            return 
FMRES_HANDLED;
        }

        return 
FMRES_IGNORED;
    }

const 
g_armor_amount 50
const g_armor_limit 999

    
public CSqueak_HuntThink ( const Snark )
    {
        if ( !
is_valid_entSnark ) )
        {
            return 
HAM_IGNORED;
        }
        static 
Float:Origin  Coord_e ];
        static 
Float:VelocityCoord_e ];
        static 
Float:Angles  Coord_e ];
        static 
Float:Flat    Coord_e ];
        static 
Float:CurrentTime;
        static 
Float:DieDelay;
        static 
Float:NextHunt;
        static 
Float:SPitch;
        static 
Enemy;

        
pevSnarkpev_velocityVelocity );
        
pevSnarkpev_originOrigin );
        
        if ( !
UTIL_IsInWorld OriginVelocity ) )
        {
            
set_pevSnarkpev_flagspevSnarkpev_flags ) | FL_KILLME );
            return 
HAM_IGNORED;
        }

        
CurrentTime get_gametime();
        
set_pevSnarkpev_nextthinkCurrentTime 0.1 );

        
pevSnarkpev_NextHuntNextHunt );
        
pevSnarkpev_DetonateDelayDieDelay );
        
pevSnarkpev_anglesAngles );

        if ( 
CurrentTime >= DieDelay )
        {
            if ( 
pevSnarkpev_Remove ) )
            {
                
set_pevSnarkpev_flagspevSnarkpev_flags ) | FL_KILLME );
                return 
HAM_IGNORED;
            }

            
set_pevSnarkpev_health, -1.0 );
            
CSqueak_Killed Snark0true );
            return 
HAM_IGNORED;
        }

        if ( 
pevSnarkpev_waterlevel ) != )
        {
            if ( 
pevSnarkpev_movetype ) == MOVETYPE_BOUNCE )
            {
                
set_pevSnarkpev_movetypeMOVETYPE_FLY );
            }

            
VectorScale Velocity0.9Velocity );
            
Velocity] += 8.0;

            
set_pevSnarkpev_velocityVelocity );
        }
        else if ( 
pevSnarkpev_movetype ) == MOVETYPE_FLY )
        {
            
set_pevSnarkpev_movetypeMOVETYPE_BOUNCE );
        }

        if ( 
NextHunt CurrentTime )
        {
            return 
HAM_IGNORED;
        }

        
set_pevSnarkpev_NextHuntCurrentTime 2.0 );

        
VectorCopy VelocityFlat );
        
Flat] = 0.0;
        
VectorNormalize FlatFlat );

        
engfuncEngFunc_MakeVectorsAngles );

        if ( ( 
Enemy pevSnarkpev_enemy ) ) == NULL_ENT || !is_aliveEnemy ] || zp_get_user_zombieEnemy ) )
        {
            
Enemy UTIL_BestVisibleEnemy Snark512.0 );
        }

        if ( 
0.3 <= DieDelay CurrentTime <= 0.5 )
        {
            
set_pevSnarkpev_scale2.0 );
            
emit_soundSnarkCHAN_VOICEgSnarkDieSoundVOL_NORMATTN_NORM0PITCH_NORM random_num00x3F ) );
        }

        
SPitch 155.0 60.0 * ( ( DieDelay CurrentTime ) / get_pcvar_floatpCvarDetonateDelay ) );

        if ( 
SPitch 80.0 )  { SPitch 80.0; }

        if ( 
Enemy != NULL_ENT && !zp_get_user_zombieEnemy ) )
        {
            static 
Float:TargetCoord_e ];
            static 
Float:Vel;
            static 
Float:Adj;

            
pevSnarkpev_EnemyTargetTarget );

            if ( 
UTIL_FVisibleSnarkEnemy ) )
            {
                static 
Float:EyePositionCoord_e ];
                
UTIL_EyePosition EnemyEyePosition );

                
VectorSubtract EyePositionOriginTarget );
                
VectorNormalize TargetTarget );

                
set_pevSnarkpev_EnemyTargetTarget );
            }

            
Vel VectorLength Velocity );
            
Adj 50.0 / ( Vel 10.0 );

            if ( 
Adj 1.2 )  { Adj 1.2; }

            
Velocity] = Velocity] * Adj Target] * 300.0;
            
Velocity] = Velocity] * Adj Target] * 300.0;
            
Velocity] = Velocity] * Adj Target] * 300.0;

            
set_pevSnarkpev_velocityVelocity );
        }

        if ( 
pevSnarkpev_flags ) & FL_ONGROUND )
        {
            
set_pevSnarkpev_avelocityFloat:{ 0.00.00.0 } );
        }
        else
        {
            static 
Float:AVelocityCoord_e ];
            
pevSnarkpev_avelocityAVelocity );

            if ( 
AVelocity] == 0.0 && AVelocity] == 0.0 && AVelocity] == 0.0 )
            {
                
AVelocity] = random_float( -100.0100.0 );
                
AVelocity] = random_float( -100.0100.0 );

                
set_pevSnarkpev_avelocityAVelocity );
            }
        }

        static 
Float:PosPrevCoord_e ];
        
pevSnarkpev_PosPrevPosPrev );

        
VectorSubtract OriginPosPrevPosPrev );

        if ( 
VectorLength PosPrev ) < 1.0 )
        {
            
Velocity] = random_float( -100.0100.0 );
            
Velocity] = random_float( -100.0100.0 );

            
set_pevSnarkpev_velocityVelocity );
        }

        
set_pevSnarkpev_PosPrevOrigin );

        
vector_to_angleVelocityAngles );

        
Angles] = 0.0;
        
Angles] = 0.0;

        
set_pevSnarkpev_anglesAngles );

        return 
HAM_IGNORED;
    }


    public 
CSqueak_SuperBounceTouch ( const Snark, const Other )
    {
        if ( !
is_valid_entSnark ) )
        {
            return;
        }
        static 
Float:Angles Angle_e ];
        static 
Float:NextHit;
        static 
Float:DieDelay;
        static 
Float:NextAttack;
        static 
Float:NextBounceSoundTime;
        static 
Float:SPitch;
        static 
Float:CurrentTime;
        static 
Owner;
    
        
Owner pevSnarkpev_owner );

        if ( 
Owner && Other == Owner )
        {
            return;
        }

        
SPitch PITCH_NORM 1.0;
        
CurrentTime get_gametime();

        
set_pevSnarkpev_ownerNULL_ENT );

        
pevSnarkpev_anglesAngles );
        
pevSnarkpev_NextHitNextHit );
        
pevSnarkpev_DetonateDelayDieDelay );
        
pevSnarkpev_NextAttackNextAttack );
        
pevSnarkpev_NextBounceSoundTimeNextBounceSoundTime );

        
Angles] = 0.0;
        
Angles] = 0.0;

        
set_pevSnarkpev_anglesAngles );

        if ( 
NextHit CurrentTime )
        {
            return;
        }

        
SPitch 155.0 60.0 * ( ( DieDelay CurrentTime ) / get_pcvar_floatpCvarDetonateDelay ) );

        if ( 
<= Other <= gMaxClients && pevOtherpev_takedamage ) && NextAttack CurrentTime )
        {
            static 
Hit;
            
Hit global_getglb_trace_ent );

            if ( 
Hit == Other && pevHitpev_modelindex ) != pevSnarkpev_modelindex ) && <= Other <= gMaxClients )
            {
                
Owner pevSnarkpev_RealOwner );
                if(
Other!=Owner && is_alive[Other] && is_user_valid_connected(Owner) && !zp_get_user_zombieOther ) ){    
                    if(
pev(Otherpev_armorvalue)>float(g_armor_amount)) armor[Other] = true
                    
else armor[Other] = false
                    
if ( zp_get_user_last_humanOther ) || zp_get_user_survivorOther ) || armor[Other])
                    {
                        static 
Float:Forward    Coord_e ];
                        static 
Float:EndPos     Coord_e ];
                        static 
Float:OriginSnarkCoord_e ];
                        static 
Float:OriginOtherCoord_e ];
                        static 
Trace;
                        static 
Float:Damage;

                        
Trace create_tr2();
                            
                        
pevSnarkpev_dmgDamage );
                        
pevSnarkpev_originOriginSnark );
                        
pevOtherpev_originOriginOther );

                        
engfuncEngFunc_TraceLineOriginSnarkOriginOtherDONT_IGNORE_MONSTERSSnarkTrace );
                            
                        
get_tr2TraceTR_vecPlaneNormalForward );
                        
get_tr2TraceTR_vecEndPosEndPos );

                        
ExecuteHamHam_TraceBleedOtherDamageForwardTraceDMG_SLASH );
                        
free_tr2Trace );
                            
                        
FX_BloodDrips EndPosBLOOD_COLOR_RED, .Amount floatroundDamage ) ); 
                        if(
armor[Other])
                            
set_pev(Otherpev_armorvaluefloat(min(pev(Otherpev_armorvalue)-g_armor_amountg_armor_limit)));
                        else
                            
ExecuteHamHam_TakeDamageOtherSnarkOwnerDamageDMG_SLASH );
                        
set_pevSnarkpev_dmgget_pcvar_floatpCvarDamagePop ) );
                    }
                    else
                    {
                        
zp_infect_userOtherOwner, .silent 0, .rewards );
                        
zp_set_user_ammo_packsOwnerzp_get_user_ammo_packsOwner ) + );
                        
set_user_fragsOwnerget_user_fragsOwner ) + );
                        
set_pevSnarkpev_enemyNULL_ENT );
                    }
                }
                
emit_soundSnarkCHAN_WEAPONgSnarkAttackSoundVOL_NORMATTN_NORM0floatroundSPitch ) );
                
set_pevSnarkpev_NextAttackCurrentTime 0.5 );
            }
        }

        
set_pevSnarkpev_NextHitCurrentTime 0.1 );
        
set_pevSnarkpev_NextHuntCurrentTime );

        if ( 
CurrentTime NextBounceSoundTime )
        {
            return;
        }

        if ( !( 
pevSnarkpev_flags ) & FL_ONGROUND ) )
        {
            switch ( 
random10 ) )
            {
                case 
.. emit_soundSnarkCHAN_VOICEgSnarkHunt1SoundVOL_NORMATTN_NORM0floatroundSPitch ) );
                case 
.. emit_soundSnarkCHAN_VOICEgSnarkHunt2SoundVOL_NORMATTN_NORM0floatroundSPitch ) );
                default     : 
emit_soundSnarkCHAN_VOICEgSnarkHunt3SoundVOL_NORMATTN_NORM0floatroundSPitch ) );
            }
        }

        
set_pevSnarkpev_NextBounceSoundTimeCurrentTime 0.5 );
    }


    
CSqueak_Create ( const Player, const Float:OriginCoord_e ], const Float:AnglesCoord_e], const Float:VelocityCoord_e ] )
    {
        new 
Snark create_entitygGenericEntity );

        if ( 
is_valid_entSnark ) )
        {
            
set_pevSnarkpev_classnamegSnarkClassName );
            
set_pevSnarkpev_groupinfogSnarkClassNameReference );
            
set_pevSnarkpev_ownerPlayer );
            
set_pevSnarkpev_originOrigin );
            
set_pevSnarkpev_anglesAngles );
            
set_pevSnarkpev_velocityVelocity );

            
CSqueak_Spawn PlayerSnarkOrigin );

            return 
Snark;
        }

        return 
NULL_ENT;
    }


    
CSqueak_Spawn ( const Player, const Snark, const Float:OriginCoord_e ] )
    {
        new 
Float:CurrentTime get_gametime();

        
set_pevSnarkpev_movetypeMOVETYPE_BOUNCE );
        
set_pevSnarkpev_solidSOLID_BBOX );

        
entity_set_model SnarkgSnarkModel );
        
entity_set_size  SnarkFloat:{ -4.0, -4.00.0 }, Float:{ 4.04.08.0 } );
        
entity_set_originSnarkOrigin );

        
set_pevSnarkpev_nextthinkCurrentTime 0.1 );

        
set_pevSnarkpev_NextHuntCurrentTime 1000000.0 ); // NextHunt
        
set_pevSnarkpev_DetonateDelayCurrentTime get_pcvar_floatpCvarDetonateDelay ) ); // DetonateDelay
        
set_pevSnarkpev_NextBounceSoundTimeCurrentTime ); // NextBounceSoundTime
        
set_pevSnarkpev_RealOwnerPlayer ); // RealOwner

        
set_pevSnarkpev_flagspevSnarkpev_flags ) | FL_MONSTER );
        
set_pevSnarkpev_takedamageDAMAGE_AIM );
        
set_pevSnarkpev_healthget_pcvar_floatpCvarHealth ) + gSnarkHealthReference );
        
set_pevSnarkpev_gravityget_pcvar_floatpCvarGravity ) );
        
set_pevSnarkpev_frictionget_pcvar_floatpCvarFriction ) );
        
set_pevSnarkpev_fovget_pcvar_numpCvarFieldOfView ) );
        
set_pevSnarkpev_dmgget_pcvar_floatpCvarDamagePop ) );

        
// --| Force snark to run.
        
set_pevSnarkpev_sequencewsqueak_run );
        
set_pevSnarkpev_framerate1.0 );
        
set_pevSnarkpev_animtimeCurrentTime );

        if ( 
get_pcvar_numpCvarShowTrail ) )
        {
            
message_begin MSG_BROADCASTSVC_TEMPENTITY );
            
write_byte TE_BEAMFOLLOW );
            
write_short Snark );
            
write_short gSmokeTrail );
            
write_byte TRAIL_LIFE );   // life
            
write_byte TRAIL_WIDTH );  // width
            
write_byte TRAIL_RED );
            
write_byte TRAIL_GREEN );
            
write_byte TRAIL_BLUE );
            
write_byte TRAIL_BRIGTHNESS );
            
message_end();
        }
    }


    public 
CSqueak_WeaponIdle ( const Player )
    {
        if ( 
gHasSnarkPlayer } && gWeaponActivePlayer } )
        {
            static 
Float:CurrentTime;
            
CurrentTime get_gametime();

            if ( 
gTimeWeaponIdlePlayer ] > CurrentTime )
            {
                return;
            }

            if ( 
gJustThrownPlayer } )
            {
                
gJustThrownPlayer } = false;

                if ( !
gPlayerAmmoPlayer } )
                {
                    
RemoveWeapon Playerget_pdata_cbasePlayerm_pActiveWeapon ) );
                    return;
                }

                
UTIL_PlayWeaponAnimation Playersqueak_up );
                
gTimeWeaponIdlePlayer ] = CurrentTime random_float 10.015.0 );

                return;
            }

            new 
Animation;
            new 
Float:NewTime;

            switch ( 
random_num010 ) )
            {
                case 
.. :
                {
                    
Animation squeak_idle1;
                    
NewTime   30.0 16.0 * ( 2.0 );
                }
                case 
.. :
                {
                    
Animation squeak_fidgetfit;
                    
NewTime   70.0 16.0;
                }
                default :
                {
                    
Animation squeak_fidgetnip;
                    
NewTime   80.0 16.0;
                }
            }

            
UTIL_PlayWeaponAnimation PlayerAnimation );
            
gTimeWeaponIdlePlayer ] = CurrentTime NewTime;
        }
    }


    
ChangeWeaponToSnark ( const Player )
    {
        
set_pevPlayerpev_viewmodel2  gModel_V );
        
set_pevPlayerpev_weaponmodel2gModel_P );
    }
    
    
    
UpdateHud ( const Player )
    {
        
message_beginMSG_ONE_UNRELIABLEgMsgidAmmoX, .player Player );
        
write_byte12 );
        
write_bytegPlayerAmmoPlayer } );
        
message_end();
    }
    
    
    
RemoveWeapon ( const Player, const Weapon )
    {
        
ExecuteHamBHam_Weapon_RetireWeaponWeapon );
        
ExecuteHamBHam_RemovePlayerItemPlayerWeapon );
        
ExecuteHamBHam_Item_KillWeapon );

        
set_pevPlayerpev_weaponspevPlayerpev_weapons ) & ~( << gWeaponIndex ) );
        
cs_set_user_bpammoPlayergWeaponIndex);

        
gHasSnarkPlayer } = false;
        
gWeaponActivePlayer } = false;
    }
    

    
stock bool:UTIL_IsBSPModel ( const Entity )
    {
        return ( 
peventitypev_solid ) == SOLID_BSP || pevEntitypev_movetype ) == MOVETYPE_STEP );
    }
    
    
    
UTIL_BestVisibleEnemy ( const Snark, const Float:DistanceToSearch /* , const Flags */ )
    {
        static List[ 
MAX_CLIENTS ];
        static 
Float:Distance;
        static 
Float:Nearest;
        static 
ReturnEntity;
        static 
Count;
        static 
Entity;
        static 
i;

        
Nearest 8192.0;
        
ReturnEntity NULL_ENT;

        
Count find_sphere_classSnark"player"DistanceToSearch, List, sizeof List );

        for ( 
0Counti++ )
        {
            
Entity = List[ ];
            
            if ( 
zp_get_user_zombieEntity ) )
            {
                continue;
            }

            if ( 
UTIL_FInViewCone SnarkEntity ) && UTIL_FVisibleSnarkEntity ) )
            {
                if ( ( 
Distance entity_rangeSnarkEntity ) ) <= Nearest )
                {
                    
Nearest Distance;
                    
ReturnEntity Entity;
                }
            }
        }

        
set_pevSnarkpev_enemyReturnEntity );
        return 
ReturnEntity;
    }

    
    
    
UTIL_PlayWeaponAnimation ( const Player, const Sequence )
    {
        
set_pevPlayerpev_weaponanimSequence );

        
message_beginMSG_ONE_UNRELIABLESVC_WEAPONANIM, .player Player );
        
write_byteSequence );
        
write_bytepevPlayerpev_body ) );
        
message_end();
    }


    
bool:UTIL_IsInWorld ( const Float:OriginCoord_e ], const Float:VelocityCoord_e ] )
    {
        static 
i;

        for ( 
x<= zi++ )
        {
            if ( !( -
4096.0 Origin] < 4096.0 ) && !( -2000.0 Velocity] < 2000.0 ) )
            {
                return 
false;
            }
        }

        return 
true;
    }


    
UTIL_RandomBloodVector Float:DirectionCoord_e ] )
    {
        
Direction] = random_float( -1.01.0 );
        
Direction] = random_float( -1.01.0 );
        
Direction] = random_float(  0.01.0 );
    }


    
FX_BloodDrips ( const Float:OriginCoord_e ], const BloodColor, const Amount )
    {
        
message_begin_fMSG_PVSSVC_TEMPENTITYOriginNULL_ENT );
        
write_byteTE_BLOODSPRITE );
        
write_coord_fOrigin] );
        
write_coord_fOrigin] );
        
write_coord_fOrigin] );
        
write_shortgBloodSpray );         // initial sprite model
        
write_shortgBloodDrop );          // droplet sprite models
        
write_byteBloodColor );           // color index into host_basepal
        
write_byteminmax3, ( Amount 255 255 Amount ) / 10 ), 16 ) );  // size
        
message_end();
    }


    
FX_StreakSplash ( const Float:OriginCoord_e ], const Float:DirectionCoord_e ], const Color, const Count, const Speed, const VelocityRange )
    {
        
message_begin_fMSG_PVSSVC_TEMPENTITYOriginNULL_ENT );
        
write_byteTE_STREAK_SPLASH );
        
write_coord_fOrigin] );
        
write_coord_fOrigin] );
        
write_coord_fOrigin] );
        
write_coord_fDirection] );
        
write_coord_fDirection] );
        
write_coord_fDirection] );
        
write_byteminColor255 ) );
        
write_shortCount );
        
write_shortSpeed );
        
write_shortVelocityRange );// random velocity modifier
        
message_end();
    }
    
    
    
stock FX_TraceBleed( const Victim, const Float:Damage, const Float:DirCoord_e ], const TraceResult:Trace )
    {
        new 
TraceResult:BloodTrace;
        new 
Float:TraceDirCoord_e ]; 
        new 
Float:EndPos  Coord_e ];
        new 
Float:Noise;
        new 
Float:Fraction;
        new 
Count;

        if ( 
Damage 10 )
        {
            
Noise 0.1;
            
Count 1;
        }
        else if ( 
Damage 25 )
        {
            
Noise 0.2;
            
Count 2;
        }
        else
        {
            
Noise 0.3;
            
Count 4;
        }

        for ( new 
Count i++ )
        {
            
VectorScale Dir, -1.0TraceDir );

            
TraceDir] += random_float( -NoiseNoise );
            
TraceDir] += random_float( -NoiseNoise );
            
TraceDir] += random_float( -NoiseNoise );
            
            
get_tr2TraceTR_vecEndPosEndPos );
            
VectorMA EndPos, -172.0TraceDirTraceDir );
            
            
engfuncEngFunc_TraceLineEndPosTraceDirIGNORE_MONSTERSVictimBloodTrace );
            
get_tr2BloodTraceTR_flFractionFraction );

            if ( 
Fraction != 1.0 )
            {
                
FX_BloodDecalTraceBloodTraceEndPosBLOOD_COLOR_RED );
            }
        }
    }
    

    
stock FX_BloodDecalTrace ( const TraceResult:Trace, const Float:EndPosCoord_e ], const BloodColor )
    {
        new 
Hit;
        new 
BaseIndex;
        new 
DecalIndex;
        new 
Float:Fraction
    
        switch ( 
BloodColor )
        {
            case 
BLOOD_COLOR_YELLOW BaseIndex get_decal_index"{yblood1" );
            case 
BLOOD_COLOR_RED    BaseIndex get_decal_index"{blood1" );
        }
        
        
DecalIndex BaseIndex random_num0);

        
Hit max0get_tr2TraceTR_pHit ) );
        
get_tr2TraceTR_flFractionFraction );

        if ( 
Fraction == 1.0 || ( Hit && !UTIL_IsBSPModel Hit ) ) )
        {
            return;
        }   
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byteHit TE_DECAL TE_WORLDDECAL );
        
write_coord_fEndPos] );
        
write_coord_fEndPos] );
        
write_coord_fEndPos] );
        
write_byteDecalIndex );
        if ( 
Hit )
        {
            
write_shortHit );
        }
        
message_end();
    }
    

    
stock UTIL_RadiusDamage ( const Float:OriginCoord_e ], const Inflictor, const Attacker, const Float:Damage, const Float:Radius, const DamageBits )
    {
        static 
Entity;
        static 
Trace;
        static 
Float:AdjustedDamage;
        static 
bool:InWater;

        
Entity NULL_ENT;
        
InWater UTIL_LiquidContentsOrigin );

        while ( ( 
Entity find_ent_in_sphereEntityOriginRadius ) ) != NULL_ENT )
        {
            if ( 
Entity == Inflictor )
            {
                continue;
            }
            if(!
is_user_valid_connected(Entity)) return PLUGIN_CONTINUE
            
if(is_bot[Entity] || !is_alive[Entity] || !cs_get_user_team(Entity) ) return PLUGIN_CONTINUE
            
if ( pevEntitypev_takedamage ) && !zp_get_user_zombieEntity ) && !zp_get_user_last_humanEntity ) )
            {
                static 
Float:EntOriginCoord_e ];
                static 
Float:EndPos   Coord_e ];
                static 
Float:Fraction;

                
pevEntitypev_originEntOrigin );

                
engfuncEngFunc_TraceLineOriginEntOriginIGNORE_MONSTERSInflictorTrace );

                
get_tr2TraceTR_flFractionFraction );
                
get_tr2TraceTR_vecEndPosEndPos );

                if ( 
Fraction == 1.0 || get_tr2TraceTR_pHit ) == Entity )
                {
                    static 
Float:DeltaCoord_e ];
                    static 
Float:Len;

                    if ( 
get_tr2TraceTR_StartSolid ) )
                    {
                        
EndPos Origin;
                        
Fraction 0.0;
                    }

                    
AdjustedDamage Damage;
                    
VectorSubtract EndPosOriginDelta );

                    if ( ( 
Len VectorLength Delta ) ) != 0.0 )
                    {
                        
VectorScale DeltaLenDelta );
                    }

                    if ( 
Len 2.0 )
                    {
                        
Len -= 2.0;
                    }

                    if ( ( 
AdjustedDamage *= ( 1.0 Len Radius ) ) <= )
                    {
                        continue;
                    }

                    if ( 
InWater || pevEntitypev_waterlevel ) > )
                    {
                        
AdjustedDamage *= 0.5;
                    }

                    if ( 
Fraction != 1.0 )
                    {
                        
ExecuteHamHam_TraceAttackEntityInflictorAdjustedDamageDeltaTraceDamageBits );
                        
ExecuteHamHam_TakeDamageEntityInflictorAttackerAdjustedDamageDamageBits );
                    }
                    else
                    {
                        
ExecuteHamHam_TakeDamageEntityInflictorAttackerAdjustedDamageDamageBits );
                    }
                }
            }
        }
        return 
PLUGIN_CONTINUE
    
}
    
    
    
stock UTIL_EntitiesInBox ( List[], const ListMax, const Float:MinsCoord_e ], const Float:MaxsCoord_e ], const Flags )
    {
        
/*
        static Float:Origin [ Coord_e ];
        static Float:Delta  [ Coord_e ];
        static Float:Mins   [ Coord_e ];
        static Float:Maxs   [ Coord_e ];

        pev( Snark, pev_origin, Origin );

        Delta[ x ] = Delta[ y ] = Delta[ z ] = DistanceToSearch;

        VectorSubtract ( Origin, Delta, Mins );
        VectorAdd ( Origin, Delta, Maxs );

        Count = UTIL_EntitiesInBox ( List, sizeof List, Mins, Maxs, Flags );
        */

        
static Float:AbsMinsCoord_e ];
        static 
Float:AbsMaxsCoord_e ];
        static 
Count;
        static 
Entity;

        
Count 0;

        for ( 
Entity 1Entity <= gMaxEntitiesEntity++ )  if( is_valid_entEntity ) )
        {
            if ( !( 
pevEntitypev_flags ) & Flags ) )
            {
                continue;
            }

            
pevEntitypev_absminAbsMins );
            
pevEntitypev_absmaxAbsMaxs );

            if ( 
Mins] > AbsMaxs] || Mins] > AbsMaxs] || Mins] > AbsMaxs] ||
                 
Maxs] < AbsMins] || Maxs] < AbsMins] || Maxs] < AbsMins] )
            {
                continue;
            }

            List[ 
Count ] = Entity;

            if ( 
Count++ >= ListMax )
            {
                return 
Count;
            }
        }

        return 
Count;
    }


    
bool:UTIL_FVisible ( const Entity, const Other )
    {
        static 
Float:LookerOriginCoord_e ];
        static 
Float:TargetOriginCoord_e ];
        static 
Float:Fraction;
        static 
LookerWLevel;
        static 
TargetWLevel;

        if ( 
pevOtherpev_flags ) & FL_NOTARGET )
        {
            return 
false;
        }

        
LookerWLevel pev Entitypev_waterlevel );
        
TargetWLevel pev Otherpev_waterlevel );

        if ( ( 
LookerWLevel != && TargetWLevel == ) || ( LookerWLevel == && TargetWLevel == 0  ) )
        {
            return 
false;
        }

        
UTIL_EyePosition EntityLookerOrigin );
        
UTIL_EyePosition OtherTargetOrigin );

        
engfuncEngFunc_TraceLineLookerOriginTargetOriginIGNORE_MONSTERS IGNORE_GLASSEntity);
        
get_tr20TR_flFractionFraction );

        return 
Fraction == 1.0 true false;
    }


    
bool:UTIL_FInViewCone ( const Entity, const Other )
    {
        static 
Float:Angles Coord_e ];
        static 
Float:HOriginCoord_e ];
        static 
Float:Origin Coord_e ];

        
pevEntitypev_anglesAngles );
        
engfuncEngFunc_MakeVectorsAngles );
        
global_getglb_v_forwardAngles );

        
Angles] = 0.0;

        
pevEntitypev_originHOrigin );
        
pevOtherpev_originOrigin );

        
VectorSubtract OriginHOriginOrigin );
        
Origin] = 0.0;

        
VectorNormalize OriginOrigin );

        if ( 
DotProduct OriginAngles ) > pevEntitypev_fov ) )
        {
            return 
true;
        }

        return 
false;
    }


    
UTIL_EyePosition ( const EntityFloat:OriginCoord_e ] )
    {
        static 
Float:ViewOfsCoord_e ];

        
pevEntitypev_originOrigin );
        
pevEntitypev_view_ofsViewOfs );

        
VectorAdd OriginViewOfsOrigin );
    }


    
stock bool:UTIL_LiquidContents( const Float:SourceCoord_e ] )
    {
        new 
Contents point_contentsSource );
        return ( 
Contents == CONTENTS_WATER || Contents == CONTENTS_SLIME || Contents == CONTENTS_LAVA );
    }


    
VectorNormalize ( const Float:SourceCoord_e ], Float:OutputCoord_e ] )
    {
        static 
Float:InvLen;

        
InvLen 1.0 VectorLength Source );

        
Output] = Source] * InvLen;
        
Output] = Source] * InvLen;
        
Output] = Source] * InvLen;
    } 
HTML Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// zp_extra_squeakgrenade.sma
//
// \cstrike\addons\amxmodx\scripting\zp_extra_squeakgrenade.sma(149)
: error 020: invalid symbol name ""
// \cstrike\addons\amxmodx\scripting\zp_extra_squeakgrenade.sma(150)
: error 020: invalid symbol name ""
// \cstrike\addons\amxmodx\scripting\zp_extra_squeakgrenade.sma(150)
: warning 201: redefinition of constant/macro (symbol "")
//
// 2 Errors.
// Could not locate output file \cstrike\addons\amxmodx\scripting\com
piled\zp_extra_squeakgrenade.amx (compile failed).
//
// Compilation Time: 0.78 sec
// ----------------------------------------

Press enter to exit ...
In version v1.8.2 there is no compile problem
But in v1.9
I get this error

Last edited by amirwolf; 01-30-2021 at 13:41.
amirwolf is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-30-2021 , 13:34   Re: error 020: invalid symbol name ""
Reply With Quote #2

Because in 1.9 those symbols are already defined. Simply delete the lines to compile.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-30-2021 , 13:41   Re: error 020: invalid symbol name ""
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Because in 1.9 those symbols are already defined. Simply delete the lines to compile.
Thank you
amirwolf is offline
Reply


Thread Tools
Display Modes

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 06:37.


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