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

[ZP] Gauss Weapon for Admin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XeOn Cp
Senior Member
Join Date: Jan 2014
Old 04-02-2015 , 06:52   [ZP] Gauss Weapon for Admin
Reply With Quote #1

hi guys, it has some errors with compiling, what is wrong in it?
zp_extra_gauss.sma
XeOn Cp is offline
Keys PK
Member
Join Date: Mar 2015
Location: Romania
Old 04-02-2015 , 13:41   Re: [ZP] Gauss Weapon for Admin
Reply With Quote #2

testt
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_gauss.sma - 901 views - 20.6 KB)
__________________
Keys PK is offline
Send a message via Skype™ to Keys PK
thekiller123
Member
Join Date: Dec 2012
Old 04-02-2015 , 14:02   Re: [ZP] Gauss Weapon for Admin
Reply With Quote #3

try:

PHP Code:
/*================================================================================

    [ZP] Extra Item: Gauss
    Copyright (C) 2009 by meTaLiCroSS, Viņa del Mar, Chile
    
    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 3 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, see <http://www.gnu.org/licenses/>.
    
    In addition, as a special exception, the author gives permission to
    link the code of this program with the Half-Life Game Engine ("HL
    Engine") and Modified Game Libraries ("MODs") developed by Valve,
    L.L.C ("Valve"). You must obey the GNU General Public License in all
    respects for all of the code used other than the HL Engine and MODs
    from Valve. If you modify this file, you may extend this exception
    to your version of the file, but you are not obligated to do so. If
    you do not wish to do so, delete this exception statement from your
    version.

=================================================================================*/

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <zombie_plague_advance>

#define ADMIN_FLAG ADMIN_LEVEL_A

/*================================================================================
 [Customizations]
=================================================================================*/

// Items Costs
const gauss_weapon_cost 100     // Gauss Cost
const gauss_ishield_cost 10     // Gauss Immunity Shield Cost 

// Sprites
new const sprite_beam_cylinder[] = "sprites/white.spr"        // Beam Cylinder Sprite
new const sprite_big_explosion[] = "sprites/zerogxplode.spr"    // Explosion Sprite

/*================================================================================
 Customization ends here! Yes, that's it. Editing anything beyond
 here is not officially supported. Proceed at your own risk...
=================================================================================*/

// Variables
new g_iItemIDg_iItemID2g_msgSayTextg_msgCurWeapon

// Arrays
new g_iHasGaussWeapon[33], g_iHasGaussIShield[33], g_iCurrentWeapon[33]

// Cvars
new cvar_enablecvar_apforkillcvar_buyindelaycvar_explobullet,
cvar_particlescvar_bloodcvar_nemesis_immunecvar_assassin_immunecvar_enable_giscvar_pattack_rate

// Sprite's vars
new g_sprWhiteg_sprBigExplosion

// Offsets
const m_pPlayer =         41
const m_flNextPrimaryAttack =     46
const m_flNextSecondaryAttack =    47
const m_flTimeWeaponIdle =     48

// Plug info.
#define PLUG_VERSION "0.6"
#define PLUG_AUTH "meTaLiCroSS"

/*================================================================================
 [Init and Precache]
=================================================================================*/

public plugin_init()
{
    
// Register the Plugin
    
register_plugin("[ZP] Extra Item: Gauss"PLUG_VERSIONPLUG_AUTH)
    
    
// Cvars
    
cvar_enable register_cvar("zp_gauss_enable""1")
    
cvar_enable_gis register_cvar("zp_gauss_enable_ishield""1")
    
cvar_buyindelay register_cvar("zp_gauss_buy_before_modestart""0")
    
cvar_apforkill register_cvar("zp_gauss_ap_for_kill""2")
    
cvar_nemesis_immune register_cvar("zp_gauss_nemesis_immune""1")
    
cvar_assassin_immune register_cvar("zp_gauss_assassin_immune""1")
    
cvar_explobullet register_cvar("zp_gauss_explosive_bullets""1")
    
cvar_blood register_cvar("zp_gauss_bloodstyle""3")
    
cvar_particles register_cvar("zp_gauss_particles""1")
    
cvar_pattack_rate register_cvar("zp_gauss_primattack_rate""2.0")
    
    new 
szCvar[30]
    
formatex(szCvarcharsmax(szCvar), "v%s by %s"PLUG_VERSIONPLUG_AUTH)
    
register_cvar("zp_extra_gauss"szCvarFCVAR_SERVER|FCVAR_SPONLY)
    
    
// Hamsandwich Forwards
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_awp""fw_AWP_PrimaryAttack_Post"1)
    
    
// Message ID's vars
    
g_msgSayText get_user_msgid("SayText")
    
g_msgCurWeapon get_user_msgid("CurWeapon")
    
    
// Events
    
register_event("CurWeapon""event_CurWeapon""b""1=1")    

    
register_event("HLTV""event_round_start""a""1=0""2=0");

    
    
// Messages
    
register_message(get_user_msgid("DeathMsg"), "message_DeathMsg")
    
    
// Variables
    
g_iItemID zp_register_extra_item("Gauss Weapon"gauss_weapon_costZP_TEAM_HUMAN)
    
g_iItemID2 zp_register_extra_item("Gauss Immunity Shield"gauss_ishield_costZP_TEAM_ZOMBIE)
}

public 
plugin_precache()
{
    
// Hamsandwich Forwards
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
// Models
    
precache_model("models/zombie_plague/v_gauss.mdl")
    
    
// Sounds
    
precache_sound("ambience/particle_suck2.wav")
    
    
// Sprites
    
g_sprWhite precache_model(sprite_beam_cylinder)
    
g_sprBigExplosion precache_model(sprite_big_explosion)
}

/*================================================================================
 [Main Events/Messages]
=================================================================================*/

public event_CurWeapon(id)
{
    
// Not Alive
    
if (!is_user_alive(id))
        return 
PLUGIN_CONTINUE
        
    
// Store weapon id for reference
    
g_iCurrentWeapon[id] = read_data(2)
    
    
// Check
    
if(zp_get_user_zombie(id) || zp_get_user_survivor(id))
        return 
PLUGIN_CONTINUE
        
    
// Has gauss and weapon is AWP
    
if(!g_iHasGaussWeapon[id] || g_iCurrentWeapon[id] != CSW_AWP
        return 
PLUGIN_CONTINUE
        
    entity_set_string
(idEV_SZ_viewmodel"models/zombie_plague/v_gauss.mdl")
    
    return 
PLUGIN_CONTINUE
}

public 
message_DeathMsg(msg_idmsg_destid)
{
    static 
szTruncatedWeapon[33], iAttackeriVictim
    
    
// Get truncated weapon
    
get_msg_arg_string(4szTruncatedWeaponcharsmax(szTruncatedWeapon))
    
    
// Get attacker and victim
    
iAttacker get_msg_arg_int(1)
    
iVictim get_msg_arg_int(2)
    
    
// Non-player attacker or self kill
    
if(!is_user_connected(iAttacker) || iAttacker == iVictim)
        return 
PLUGIN_CONTINUE
        
    
// Killed by world, usually executing Ham_Killed and attacker has a Gauss
    
if(equal(szTruncatedWeapon"world") && g_iHasGaussWeapon[iAttacker] && g_iCurrentWeapon[iAttacker] == CSW_AWP)
        
set_msg_arg_string(4"gauss_beam")
        
    return 
PLUGIN_CONTINUE
}

/*================================================================================
 [Main Forwards]
=================================================================================*/

public client_putinserver(id)
{
    
g_iHasGaussWeapon[id] = false
    g_iHasGaussIShield
[id] = false
}

public 
client_disconnect(id)
{
    
g_iHasGaussWeapon[id] = false
    g_iHasGaussIShield
[id] = false
}

public 
fw_PlayerSpawn_Post(id)
{
    
// Remove IShield
    
if(g_iHasGaussIShield[id])
        
g_iHasGaussIShield[id] = false
}

/*
public zp_round_started(zpmode, id) {
    if(g_iHasGaussWeapon[id])
    {
        ham_give_weapon(id, "weapon_awp")
        cs_set_user_bpammo(id, CSW_AWP, 30)
            
        // Msgs
        client_printcolor(id, "/g[ZP]/y You now have a Gauss Weapon. /gZombies are Instantly Annihilated with your Gauss/y")
        client_print(id, print_center, "[Gauss] Power ON. Seek and Destroy")
        
        // Updating Models
        static iAwpID 
        iAwpID = find_ent_by_owner(-1, "weapon_awp", id)
            
        ExecuteHamB(Ham_Item_Deploy, iAwpID)
            
        engclient_cmd(id, "weapon_awp")
        emessage_begin(MSG_ONE, g_msgCurWeapon, _, id)
        ewrite_byte(1) // active
        ewrite_byte(CSW_AWP) // weapon
        ewrite_byte(cs_get_weapon_ammo(iAwpID)) // clip
        emessage_end()
    }
    
}
*/

public event_round_start()
{
    
set_task(1.0"dalegauss")

}

public 
dalegauss()
{
        for( new 
133o++)
    {
        if(
g_iHasGaussWeapon[o])
        {
            
client_print(oprint_chat"[Gauss] Power ON. Seek and Destroy")
            
ham_give_weapon(o"weapon_awp")
            
cs_set_user_bpammo(oCSW_AWP90)
            
            
// Updating Models
            
static iAwpID 
            iAwpID 
find_ent_by_owner(-1"weapon_awp"o)
            
            
ExecuteHamB(Ham_Item_DeployiAwpID)
            
            
engclient_cmd(o"weapon_awp")
            
emessage_begin(MSG_ONEg_msgCurWeapon_o)
            
ewrite_byte(1// active
            
ewrite_byte(CSW_AWP// weapon
            
ewrite_byte(cs_get_weapon_ammo(iAwpID)) // clip
            
emessage_end()
        }
    }
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    if(!
is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
        return 
HAM_IGNORED
        
    
// Victim has a gauss
    
if(g_iHasGaussWeapon[victim])
    {
        
client_print(victimprint_center"[Gauss] Power OFF")
        
g_iHasGaussWeapon[victim] = false
    
}
    
    
// Attacker has a gauss and weapon is AWP
    
if(g_iHasGaussWeapon[attacker] && g_iCurrentWeapon[attacker] == CSW_AWP)
    {
        
// Get Victim's Origin, Give AP cvar status and AP cvar amount
        
static iOrigin[3]
        
get_user_origin(victimiOrigin)
        
        
// Blood
        
switch(get_pcvar_num(cvar_blood))
        {
            case 
1:FX_BloodSpurt(iOrigin)
            case 
2:FX_BloodStream(iOrigin5)
            case 
3:
            {
                
FX_BloodSpurt(iOrigin)
                
FX_BloodStream(iOrigin5)
            }
        }
        
        
// Particles
        
if(get_pcvar_num(cvar_particles)) 
            
FX_Particles_Large(iOrigin)
        
        
// Get reward cvar
        
static iReward
        iReward 
get_pcvar_num(cvar_apforkill)
        
        
// Cvar is more than 0
        
if(bool:iReward != false)
            
client_print(attackerprint_center"[Gauss] Enemy Killed. +%d Ammopacks"iReward)
        else
            
client_print(attackerprint_center"[Gauss] Enemy Killed")
            
        
// Updating Ammopacks
        
zp_set_user_ammo_packs(attackerzp_get_user_ammo_packs(attacker) + iReward)
    }
    
    return 
HAM_IGNORED
}

public 
fw_AWP_PrimaryAttack_Post(awp)
{
    static 
id
    id 
get_pdata_cbase(awpm_pPlayer4)
    
    if(
is_user_connected(id) && g_iHasGaussWeapon[id])
    {    
        
// Get new fire rate
        
static Float:flRate
        flRate 
get_pcvar_float(cvar_pattack_rate)
        
        
// Set new rates
        
set_pdata_float(awpm_flNextPrimaryAttackflRate4)
        
set_pdata_float(awpm_flNextSecondaryAttackflRate4)
        
set_pdata_float(awpm_flTimeWeaponIdleflRate4)
        
        if(
get_pcvar_num(cvar_explobullet))
        {
            
// Get end aim origin
            
new iEndOrigin[3]
            
get_user_origin(idiEndOrigin3)
            
            
// Explosion
            
message_begin(MSG_BROADCASTSVC_TEMPENTITYiEndOrigin
            
write_byte(TE_EXPLOSION)    
            
write_coord(iEndOrigin[0]) 
            
write_coord(iEndOrigin[1]) 
            
write_coord(iEndOrigin[2]) 
            
write_short(g_sprBigExplosion)    
            
write_byte(60)    // scale in 0.1's    
            
write_byte(20)    // framerate            
            
write_byte(TE_EXPLFLAG_NONE)    
            
message_end() 
            
            
// Beam Cylinder
            
message_begin(MSG_BROADCASTSVC_TEMPENTITYiEndOrigin
            
write_byte(TE_BEAMCYLINDER)
            
write_coord(iEndOrigin[0])
            
write_coord(iEndOrigin[1])
            
write_coord(iEndOrigin[2])
            
write_coord(iEndOrigin[0])
            
write_coord(iEndOrigin[1])
            
write_coord(iEndOrigin[2]+200)
            
write_short(g_sprWhite)
            
write_byte(0)
            
write_byte(1)
            
write_byte(6)
            
write_byte(8)
            
write_byte(1)
            
write_byte(255)
            
write_byte(255)
            
write_byte(192)
            
write_byte(128)
            
write_byte(5)
            
message_end()
        }
    }
    
    return 
HAM_IGNORED
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_bits)
{
    
// Non-player damage or self damage
    
if (victim == attacker || !is_user_connected(attacker))
        return 
HAM_IGNORED
        
    
// Victim isn't a Zombie, has a Gauss weapon and Weapon isn't AWP
    
if(!zp_get_user_zombie(victim) || !g_iHasGaussWeapon[attacker] || g_iCurrentWeapon[attacker] != CSW_AWP)
        return 
HAM_IGNORED;
        
    
// Nemesis Immunity
    
if(get_pcvar_num(cvar_nemesis_immune) && zp_get_user_nemesis(victim))
    {
        
// Message
        
client_print(attackerprint_center"[Gauss] Immune Enemy"
        
        
// Get victim's origin
        
static iOrigin[3
        
get_user_origin(victimiOrigin)
        
        
// Particles
        
FX_Particles(iOrigin7)
            
        
// Damage to 0.0
        
SetHamParamFloat(40.0)
        
        return 
HAM_IGNORED
    
}
    
    
// Assassin immunity
    
if(get_pcvar_num(cvar_assassin_immune) && zp_get_user_assassin(victim))
    {
        
// Message
        
client_print(attackerprint_center"[Gauss] Immune Enemy"
        
        
// Get victim's origin
        
static iOrigin[3
        
get_user_origin(victimiOrigin)
        
        
// Particles
        
FX_Particles(iOrigin7)
            
        
// Damage to 0.0
        
SetHamParamFloat(40.0)
        
        return 
HAM_IGNORED
    
}
    
    
// Gauss Immunity Shield
    
if(get_pcvar_num(cvar_enable_gis) && g_iHasGaussIShield[victim])
    {
        
// Messages
        
client_print(attackerprint_center"[Gauss] Immune Enemy")
        
client_printcolor(victim"/g[ZP]/y The /gGauss Immunity Shield /ymade you Immune to Gauss Shoot")
            
        
// Get victim's origin
        
static iOrigin[3
        
get_user_origin(victimiOrigin)
        
        
// Particles
        
FX_Particles(iOrigin4)
            
        
// Damage to 0.0
        
SetHamParamFloat(40.0)
        
        return 
HAM_IGNORED
    
}

    
// Make the Kill
    
ExecuteHamB(Ham_Killedvictimattacker2)
    
    
// Damage to 0.0
    
SetHamParamFloat(40.0)
    
    return 
HAM_IGNORED
}

/*================================================================================
 [Zombie Plague Forwards]
=================================================================================*/

public zp_extra_item_selected(iditem)
{
    
// Gauss Weapon
    
if (item == g_iItemID) if(get_user_flags(id) & ADMIN_FLAG)
    {
        if(
get_pcvar_num(cvar_enable))
        {
            if (!
zp_has_round_started() && get_pcvar_num(cvar_buyindelay))
            {
                
client_printcolor(id"/g[ZP]/y You must wait until the round starts")
                
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + gauss_weapon_cost)
                    
                return;
            }
            
            if(
g_iHasGaussWeapon[id] && user_has_weapon(idCSW_AWP))
            {
                
client_printcolor(id"/g[ZP]/y You already have a Gauss Weapon")
                
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + gauss_weapon_cost)
                
                return;
            }
            
            
// Var's
            
g_iHasGaussWeapon[id] = true
            
            
// Gauss
            
ham_give_weapon(id"weapon_awp")
            
cs_set_user_bpammo(idCSW_AWP30)
            
            
// Msgs
            
client_printcolor(id"/g[ZP]/y You now have a Gauss Weapon. /gZombies are Instantly Annihilated with your Gauss/y")
            
client_print(idprint_center"[Gauss] Power ON. Seek and Destroy")
            
            
// Updating Models
            
static iAwpID 
            iAwpID 
find_ent_by_owner(-1"weapon_awp"id)
            
            
ExecuteHamB(Ham_Item_DeployiAwpID)
            
            
engclient_cmd(id"weapon_awp")
            
emessage_begin(MSG_ONEg_msgCurWeapon_id)
            
ewrite_byte(1// active
            
ewrite_byte(CSW_AWP// weapon
            
ewrite_byte(cs_get_weapon_ammo(iAwpID)) // clip
            
emessage_end()
        }
        else
        {
            
client_printcolor(id"/g[ZP]/y Gauss Weapon item has been disabled. /gContact Admin")
            
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + gauss_weapon_cost)
        }
    }
    
    
// Gauss Immunity Shield
    
if(item == g_iItemID2)
    {
        
// Check Cvar
        
if(get_pcvar_num(cvar_enable_gis))
        {
            
// Check Round Start
            
if (!zp_has_round_started() && get_pcvar_num(cvar_buyindelay))
            {
                
client_printcolor(id"/g[ZP]/y You must wait until the round starts")
                
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + gauss_ishield_cost)
                    
                return;
            }
            
            if(
g_iHasGaussIShield[id])
            {
                
client_printcolor(id"/g[ZP]/y You already have a Gauss Immunity Shield")
                
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + gauss_ishield_cost)
                
                return;
            }
            
            
// Var's
            
g_iHasGaussIShield[id] = true;
            
            
// Small Suck Particle FX
            
static iOrigin[3]
            
get_user_origin(idiOrigin)
            
FX_Particles(iOrigin10)
            
            
// Msgs
            
client_printcolor(id"/g[ZP]/y You now have a Gauss Immunity Shield. /gYou are Immune to the Gauss Shots/y")
        }
        else
        {
            
// Msgs
            
client_printcolor(id"/g[ZP]/y Gauss Immunity Shield item has been disabled. /gContact Admin")
            
zp_set_user_ammo_packs(idzp_get_user_ammo_packs(id) + gauss_ishield_cost)
        }
    }
}

public 
zp_user_infected_post(id)
{
    
// Has a Gauss Weapon
    
if(g_iHasGaussWeapon[id])
        
g_iHasGaussWeapon[id] = false
        
    
// Has a Shield
    
if(g_iHasGaussIShield[id])
        
g_iHasGaussIShield[id] = false
}


public 
zp_user_humanized_post(id)
{
    
// Has a Shield
    
if(g_iHasGaussIShield[id])
        
g_iHasGaussIShield[id] = false;
        
    
// Has a Gauss Weapon
    //if(g_iHasGaussWeapon[id])
    //    g_iHasGaussWeapon[id] = false;
}

/*================================================================================
 [Internal Functions]
=================================================================================*/

FX_BloodStream(iOrigin[3], count)
{
    for(new 
1<= counti++)
    {
        
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin
        
write_byte(TE_BLOODSTREAM)
        
write_coord(iOrigin[0])
        
write_coord(iOrigin[1])
        
write_coord(iOrigin[2]+40)
        
write_coord(random_num(-30,30)) // x
        
write_coord(random_num(-30,30)) // y
        
write_coord(random_num(80,300)) // z
        
write_byte(70// color
        
write_byte(random_num(100,200)) // speed
        
message_end()
    }
}

FX_BloodSpurt(iOrigin[3])
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY
    
write_byte(TE_LAVASPLASH)
    
write_coord(iOrigin[0]) 
    
write_coord(iOrigin[1]) 
    
write_coord(iOrigin[2]-26
    
message_end()
}

FX_Particles_Large(iOrigin[3])
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_IMPLOSION
    
write_coord(iOrigin[0]) 
    
write_coord(iOrigin[1]) 
    
write_coord(iOrigin[2]) 
    
write_byte(200
    
write_byte(40
    
write_byte(45
    
message_end()
    
    
// Sound by a new entity
    
new iEnt create_entity("info_target")
    
    
// Integer vector into a Float Vector
    
new Float:flOrigin[3]
    
IVecFVec(iOriginflOrigin)
    
    
// Set player's origin
    
entity_set_origin(iEntflOrigin)
    
    
// Sound
    
emit_sound(iEntCHAN_WEAPON"ambience/particle_suck2.wav"VOL_NORMATTN_NORM0PITCH_NORM)
    
emit_sound(iEntCHAN_VOICE"ambience/particle_suck2.wav"VOL_NORMATTN_NORM0PITCH_NORM)
    
    
// Remove entity
    
remove_entity(iEnt)
}

FX_Particles(iOrigin[3], count)
{
    for(new 
1<= counti++)
    {
        
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin)
        
write_byte(TE_IMPLOSION)
        
write_coord(iOrigin[0]) 
        
write_coord(iOrigin[1]) 
        
write_coord(iOrigin[2]) 
        
write_byte(random_num(100300))
        
write_byte(20
        
write_byte(3
        
message_end()
    }
}

/*================================================================================
 [Stocks]
=================================================================================*/

stock ham_give_weapon(idweapon[])
{
    if(!
equal(weapon,"weapon_",7)) 
        return 
0

    
new wEnt create_entity(weapon)
    
    if(!
is_valid_ent(wEnt)) 
        return 
0

    entity_set_int
(wEntEV_INT_spawnflagsSF_NORESPAWN)
    
DispatchSpawn(wEnt)

    if(!
ExecuteHamB(Ham_AddPlayerItem,id,wEnt))
    {
        if(
is_valid_ent(wEnt)) entity_set_int(wEntEV_INT_flagsentity_get_int(wEntEV_INT_flags) | FL_KILLME)
        return 
0
    
}

    
ExecuteHamB(Ham_Item_AttachToPlayer,wEnt,id)
    return 
1
}

stock ham_strip_weapon(idweapon[])
{
    if(!
equal(weapon,"weapon_",7)) 
        return 
0
    
    
new wId get_weaponid(weapon)
    
    if(!
wId) return 0
    
    
new wEnt
    
    
while((wEnt find_ent_by_class(wEntweapon)) && entity_get_edict(wEntEV_ENT_owner) != id) {}
    
    if(!
wEnt) return 0
    
    
if(get_user_weapon(id) == wId
        
ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
    
    if(!
ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) 
        return 
0
        
    ExecuteHamB
(Ham_Item_KillwEnt)
    
    
entity_set_int(idEV_INT_weaponsentity_get_int(idEV_INT_weapons) & ~(1<<wId))

    return 
1
}

stock client_printcolor(const id, const input[], any:...)
{
    new 
iCount 1iPlayers[32]
    
    static 
szMsg[191]
    
vformat(szMsgcharsmax(szMsg), input3)
    
    
replace_all(szMsg190"/g""^4"// green txt
    
replace_all(szMsg190"/y""^1"// orange txt
    
replace_all(szMsg190"/ctr""^3"// team txt
    
replace_all(szMsg190"/w""^0"// team txt
    
    
if(idiPlayers[0] = id
    
else get_players(iPlayersiCount"ch")
        
    for (new 
0iCounti++)
    {
        if (
is_user_connected(iPlayers[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_iPlayers[i])
            
write_byte(iPlayers[i])
            
write_string(szMsg)
            
message_end()
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
thekiller123 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 09:06.


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