Enviar respuesta 
Pipe Bomb
Autor Mensaje
Ivan.-rlz Sin conexión
Miembro


Mensajes: 118
Registro en: Apr 2016
Reputación: 0
Mensaje: #1
Pipe Bomb
Capaz a alguien le sea útil esta es la pipe bomb SIN ZOMBIE PLAGUE.

Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fun>

new const PLUGIN[] = "Pipe Bomb"
new const VERSION[] = "0.4b"
new const AUTHOR[] = "4eRT"

const m_pPlayer 41;
new const 
NADE_TYPE_PIPE 4327
new const NADE_DURATION_PIPE pev_flSwimTime
new const g_trailspr[] ="sprites/laserbeam.spr"
new const g_ringspr[] = "sprites/shockwave.spr"
new const g_vmodel[] = "models/v_pipe.mdl"
new const g_pmodel[] = "models/p_pipe.mdl"
new const g_wmodel[] = "models/w_pipe.mdl"
new const g_vflare[] = "models/v_smokegrenade.mdl"

new cvar_durationcvar_radiuscvar_modecvar_damagecvar_speedcvar_shake
new g_trailg_ringg_fireg_scoreg_deathg_shakeboolg_has_pipe[33], boolg_has_shield[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("CurWeapon""Current_Weapon""be""1=1")
    
    
register_forward(FM_SetModel,"fw_SetModel"1)
    
    
RegisterHam(Ham_Item_Deploy"weapon_smokegrenade""fw_smDeploy"1)
    
RegisterHam(Ham_Spawn"player""fw_Spawn")
    
RegisterHam(Ham_Think"grenade""fw_ThinkGren")
    
    
register_clcmd("say /pipe""pipee")
    
    
cvar_duration register_cvar("bb_pipe_duration""4")
    
cvar_radius register_cvar "bb_pipe_radius""200")
    
cvar_mode register_cvar("bb_pipe_mode""1")
    
cvar_damage register_cvar("bb_pipe_damage""50")
    
cvar_speed register_cvar("bb_pipe_speed""90.0")
    
cvar_shake register_cvar("bb_pipe_shake""1")
    
    
g_score get_user_msgid("ScoreInfo")
    
g_death get_user_msgid("DeathMsg")
    
g_shake get_user_msgid("ScreenShake")
}

public 
plugin_precache()
{
    
precache_model(g_vmodel)
    
precache_model(g_pmodel)
    
precache_model(g_wmodel)
    
precache_model(g_vflare)
    
    
g_trail precache_model(g_trailspr)
    
g_ring precache_model(g_ringspr)
}

public 
pipee(id)
{
    
g_has_pipe[id] = true
    give_item
(id"weapon_smokegrenade")
}

public 
Current_Weapon(id
{
    new 
weapon read_data(2)
    
    if(
weapon == CSW_SMOKEGRENADE)
    {
        if(
g_has_pipe[id])
        {
            
set_pev(idpev_viewmodel2g_vmodel)
            
set_pev(idpev_weaponmodel2g_pmodel)
        }
    }
}

public 
replace_models(id)
{
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
    {
        
set_pev(idpev_viewmodel2g_vmodel)
        
set_pev(idpev_weaponmodel2g_pmodel)
    }
}

public 
replace_models2(id)
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
        
set_pev(idpev_viewmodel2g_vflare)
        
public 
fw_smDeploy(const iEntity)
{
    if(
pev_valid(iEntity) != 2)
        return 
HAM_IGNORED;
    
    new 
id get_pdata_cbase(iEntitym_pPlayer4);
    
    if(
g_has_pipe[id] &&/* !zp_get_user_zombie(id) &&*/ is_user_alive(id))
    {
        
set_pev(idpev_viewmodel2g_vmodel);
        
set_pev(idpev_weaponmodel2g_pmodel);
    }
    
    return 
HAM_IGNORED;
}

public 
fw_Spawn(id)
{
    
g_has_pipe[id] = false
    g_has_shield
[id] = false
}

public 
fw_SetModel(entity, const model[]) // Set smokegrenade pipes effects and type
{
    static 
Float:dmgtimeowner;
    
pev(entitypev_dmgtimedmgtime);
    
owner pev(entitypev_owner);
    
    if(!
pev_valid(entity) || dmgtime == 0.0)
        return 
FMRES_IGNORED;
    
    if (
model[9] == 's' && model[10] == 'm' && g_has_pipe[owner])
    {
        
g_has_pipe[owner] = false;
        
entity_set_model(entityg_wmodel);
        
replace_models2(owner);
        
        
set_rendering(entitykRenderFxGlowShell12800kRenderNormal16);
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW// TE id
        
write_short(entity// entity
        
write_short(g_trail// sprite
        
write_byte(10// life
        
write_byte(10// width
        
write_byte(128// r
        
write_byte(50// g
        
write_byte(30// b
        
write_byte(255// brightness
        
message_end()
        
        
set_pev(entitypev_flTimeStepSoundNADE_TYPE_PIPE);
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
fw_ThinkGren(entity// Grenade think event
{
    if (!
pev_valid(entity))
        return 
HAM_IGNORED;
    
    static 
Float:dmgtimeFloatcurrent_timeattacker;
    
pev(entitypev_dmgtimedmgtime);
    
current_time get_gametime();
    
attacker pev(entitypev_owner);
    
    if(
dmgtime current_time)
        return 
HAM_IGNORED;
    
    if(
pev(entitypev_flTimeStepSound) == NADE_TYPE_PIPE)
    {
        static 
duration;
        
duration pev(entityNADE_DURATION_PIPE);
        
        if (
duration 0)
        {
            new 
Float:originF[3]
            
pev(entitypev_originoriginF);
            
            if (
duration == 1)
            {
                
remove_task(entity);
                
effect(originF);
                
                if (
get_pcvar_num(cvar_mode) == 1)
                    
kill(originFattacker);
                
                
engfunc(EngFunc_RemoveEntityentity);
                return 
HAM_SUPERCEDE;
            }
            
            
light(originFduration);
            
set_task(0.1"hook"entity__"b");
            
            if(
get_pcvar_num(cvar_mode) == 2)
                
set_task(1.0"hurt"entity__"b");
                
            if(
duration == 2)
                
set_task(0.1"beep"entity__"b");
            
            
set_pev(entityNADE_DURATION_PIPE, --duration);
            
set_pev(entitypev_dmgtimecurrent_time 3.0);
        } else if ((
pev(entitypev_flags) & FL_ONGROUND) && get_speed(entity) < 10)
        {
            
set_pev(entityNADE_DURATION_PIPEget_pcvar_num(cvar_duration)/3);
            
set_pev(entitypev_dmgtimecurrent_time 0.1);
        } else
            
set_pev(entitypev_dmgtimecurrent_time 0.5);
    }
    
    return 
HAM_IGNORED;
}

public 
beep(entity// Plays loop beep sound before explosion
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
}

public 
hook(entity// Magnet func. Hooks zombies to nade
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius);
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;

        new 
Float:fl_Velocity[3];
        new 
vicOrigin[3], originN[3];

        
get_user_origin(victimvicOrigin);
        
originN[0] = floatround(originF[0]);
        
originN[1] = floatround(originF[1]);
        
originN[2] = floatround(originF[2]);
        
        new 
distance get_distance(originNvicOrigin);

        if (
distance 1)
        {
            new 
Float:fl_Time distance get_pcvar_float(cvar_speed);

            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
        } else
        {
            
fl_Velocity[0] = 0.0
            fl_Velocity
[1] = 0.0
            fl_Velocity
[2] = 0.0
        
}

        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
        
        if(
get_pcvar_num(cvar_shake))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_shake_victim)
            
write_short(1<<14// amplitude
            
write_short(1<<14// duration
            
write_short(1<<14// frequency
            
message_end()
        }
    }
}

public 
hurt(entity// Hurts zombies if mode = 2
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius)/2.0;
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
        if(
get_user_health(victim) - get_pcvar_float(cvar_damage) > 0)
            
fakedamage(victim"Pipe Bomb"dam256);
    }
}

public 
light(const Float:originF[3], duration)  // Blast ring and small red light around nade from zombie_plague40.sma. Great thx, MeRcyLeZZ!!! ;)
{
    
// Lighting
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYoriginF0);
    
write_byte(TE_DLIGHT); // TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]); // x
    
engfunc(EngFunc_WriteCoordoriginF[1]); // y
    
engfunc(EngFunc_WriteCoordoriginF[2]); // z
    
write_byte(5); // radius
    
write_byte(128); // r
    
write_byte(0); // g
    
write_byte(0); // b
    
write_byte(51); //life
    
write_byte((duration 2) ? 0); //decay rate
    
message_end();
    
    
// Smallest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+385.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Medium ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+470.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
}

public 
effect(const Float:originF[3]) // Explosion effect
{
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Explosion sprite
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_EXPLOSION)
    
engfunc(EngFunc_WriteCoordoriginF[0])
    
engfunc(EngFunc_WriteCoordoriginF[1])
    
engfunc(EngFunc_WriteCoordoriginF[2])
    
write_short(g_fire//sprite index
    
write_byte(25// scale in 0.1's
    
write_byte(10// framerate
    
write_byte(0// flags
    
message_end()
}

SendDeathMsg(attackervictim// Sends death message
{
    
message_begin(MSG_BROADCASTg_death)
    
write_byte(attacker// killer
    
write_byte(victim// victim
    
write_byte(0// headshot flag
    
write_string("Pipe Bomb"// killer's weapon
    
message_end()
}

UpdateFrags(attackerfragsscoreboard// Updates attacker frags
{
    
// Set attacker frags
    
set_pev(attackerpev_fragsfloat(pev(attackerpev_frags) + frags))
        
    
// Update scoreboard with attacker and victim info
    
if (scoreboard)
    {
        
message_begin(MSG_BROADCASTg_score)
        
write_byte(attacker// id
        
write_short(pev(attackerpev_frags)) // frags
        
write_short(get_user_deaths(attacker)) // deaths
        
write_short(0// class?
        
write_short(get_user_team(attacker)) // team
        
message_end()
    }
}

public 
kill(const Float:originF[3], attacker// Kills zombies in radius / 2 if mode = 1
{
    static 
Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius) / 2.0;
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
set_msg_block(g_deathBLOCK_SET);
        
fakedamage(victim"Pipe Bomb"dam256);
        
set_msg_block(g_deathBLOCK_NOT);
        
        if(
get_user_health(victim) <= 0)
        {
            
SendDeathMsg(attackervictim);
            
            if(
victim != attacker/* && !zp_get_user_zombie(attacker)*/)
                
UpdateFrags(attacker11);
            else
                
UpdateFrags(attacker, -11);
        }
    }

(Este mensaje fue modificado por última vez en: 17/05/2016 12:30 AM por Ivan.-rlz.)
17/05/2016 12:03 AM
Encuentra todos sus mensajes Cita este mensaje en tu respuesta
FreDDy Ausente
Miembro Héroe


Trebol verde 1k
Mensajes: 1,680
Registro en: Jan 2014
Reputación: 21
Mensaje: #2
RE: Pipe Bomb
Si no sabes de quien es porque le cambias el autor?, osea que te cuesta buscar no?

Código PHP:
/*
    -*- [ZP] Extra Item: Pipe Bomb -*-
    
    -*- Author: 4eRT -*-
    
    -*- About -*-
This plugin is another extra item for Zombie Plague.
It works like Pipe Bomb in Left 4 Dead.

    -*- Description -*-
Plugin includes 2 extras: Pipe Bomb for Humans which
drags zombies to nade on ground and then kills them
(or hurts) and Mental Shield for Zombies which can
block Pipe Bombs. All setting can be configured
through the cvars.

    -*- Credits -*-
MeRcyLeZZ - Great thanks for your ZP mode!!!
frk_14 & Koshak - for pipe models
crazyeffect - multilingual
meTaLiCroSS - for optimization

    -*- Cvars -*-
    Pipe Bomb:
zp_pipe_enabled 1 // 0=off plugin 1=on
zp_pipe_radius 200 // radius of pipe bomb area def=200
zp_pipe_duration 10 // time before pipe explodes def=10
zp_pipe_cost 15 // extras cost def=15
zp_pipe_mode 1 // 1=hook zombies to nade and then make them super damage 2=hook zombies to nade and hurt them at the same time def=1
zp_pipe_speed 90.0 // speed at which drags zombies def=80.0
zp_pipe_damage 2200 // damage given to zombies def=2200
zp_pipe_shake 1 // 1=shake zombies screen 0=not def=1
zp_pipe_sound 1 //1=enable beep pipe sound 0=off def=1
zp_pipe_hud 1 // 1=enable hud messages 0=off def=1
zp_pipe_ap 0 // additional ammo packs if you killed zombie by Pipe
    Mental Shield:
zp_mshield_enabled 1 // 1=on plugin 0=off
zp_mshield_cost 7 // extras cost def=7
zp_mshield_hud 1 // 1=enable hud 0=off def=1

    -*- Modules -*-
fakemeta
hamsandwich
engine
fun
cstrike

    -*- History -*-
0.1b (23.01.10)
First release.
0.2b (24.01.10)
Fixed some mistakes.
0.3b (24.01.10)
Added models.
0.4b (25.01.10)
Model bugs fixed.
*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <engine>
#include <zombieplague>
#include <fun>
#include <cstrike>

#define VERSION "0.4b"

const m_pPlayer 41;
new const 
NADE_TYPE_PIPE 4327;
new const 
NADE_DURATION_PIPE pev_flSwimTime;
new const 
g_trailspr[] ="sprites/laserbeam.spr";
new const 
g_ringspr[] = "sprites/shockwave.spr";
new const 
g_firespr[] = "sprites/zerogxplode.spr";
new const 
g_sound[] = "items/pipe_beep.wav";
new const 
g_vmodel[] = "models/zombie_plague/v_pipe.mdl";
new const 
g_pmodel[] = "models/zombie_plague/p_pipe.mdl";
new const 
g_wmodel[] = "models/zombie_plague/w_pipe.mdl";
new const 
g_vflare[] = "models/zombie_plague/v_grenade_flare.mdl"// type here your custom flare model to prevent bug. now uses default model
new const g_extra_pipe[] = { "Pipe Bomb" };
new const 
g_extra_shield[] = { "Mental Shield" };
new 
cvar_durationcvar_radiuscvar_enabledcvar_soundcvar_costcvar_modecvar_hudcvar_damagecvar_speedcvar_shakecvar_Scostcvar_Senabledcvar_Shudcvar_extraap// some cvars
new g_msgsyncg_trailg_ringg_fireg_scoreg_deathg_shakeg_pipeboolg_has_pipe[33], boolg_has_shield[33], g_mshield// some vars

public plugin_init() {
    
register_plugin("[ZP] Extra: Pipe Bomb"VERSION"4eRT");
    
register_forward(FM_SetModel,"fw_SetModel"1);
    
register_dictionary("zp_extra_pipe.txt");
    
RegisterHam(Ham_Think"grenade""fw_ThinkGren");
    
RegisterHam(Ham_Spawn"player""fw_Spawn");
    
RegisterHam(Ham_Item_Deploy"weapon_smokegrenade""fw_smDeploy"1);
    
    
// Cvars
    
cvar_duration register_cvar("zp_pipe_duration""10");
    
cvar_radius register_cvar "zp_pipe_radius""200");
    
cvar_enabled register_cvar("zp_pipe_enabled""1");
    
cvar_cost register_cvar("zp_pipe_cost""15");
    
cvar_mode register_cvar("zp_pipe_mode""1");
    
cvar_sound register_cvar("zp_pipe_sound""1");
    
cvar_hud register_cvar("zp_pipe_hud""1");
    
cvar_damage register_cvar("zp_pipe_damage""2200");
    
cvar_speed register_cvar("zp_pipe_speed""90.0");
    
cvar_shake register_cvar("zp_pipe_shake""1");
    
cvar_extraap register_cvar("zp_pipe_ap""0");
    
cvar_Scost register_cvar("zp_mshield_cost""7");
    
cvar_Senabled register_cvar("zp_mshield_enabled""1");
    
cvar_Shud register_cvar("zp_mshield_hud""1");
    
    
// Registering extra items
    
if(get_pcvar_num(cvar_enabled))
        
g_pipe zp_register_extra_item(g_extra_pipeget_pcvar_num(cvar_cost), ZP_TEAM_HUMAN);
    
    if(
get_pcvar_num(cvar_Senabled))
        
g_mshield zp_register_extra_item(g_extra_shieldget_pcvar_num(cvar_Scost), ZP_TEAM_ZOMBIE);
    
    
g_msgsync CreateHudSyncObj();
    
g_score get_user_msgid("ScoreInfo");
    
g_death get_user_msgid("DeathMsg");
    
g_shake get_user_msgid("ScreenShake");
}

public 
plugin_precache() {
    
precache_model(g_vmodel);
    
precache_model(g_pmodel);
    
precache_model(g_wmodel);
    
precache_model(g_vflare);
    
precache_sound(g_sound);
    
g_fire precache_model(g_firespr);
    
g_trail precache_model(g_trailspr);
    
g_ring precache_model(g_ringspr);
}

public 
replace_models(id)
{
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
    {
        
set_pev(idpev_viewmodel2g_vmodel);
        
set_pev(idpev_weaponmodel2g_pmodel);
    }
}

public 
replace_models2(id)
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
        
set_pev(idpev_viewmodel2g_vflare);

public 
fw_smDeploy(const iEntity)
{
    if(
pev_valid(iEntity) != 2)
        return 
HAM_IGNORED;
    
    new 
id get_pdata_cbase(iEntitym_pPlayer4);
    
    if(
g_has_pipe[id] && !zp_get_user_zombie(id) && is_user_alive(id))
    {
        
set_pev(idpev_viewmodel2g_vmodel);
        
set_pev(idpev_weaponmodel2g_pmodel);
    }
    
    return 
HAM_IGNORED;
}

public 
zp_extra_item_selected(iditem)
{
    if(
item == g_pipe)
    {
        if(!
get_pcvar_num(cvar_enabled))
        {
            
client_print(idprint_chat"[ZP] %L"id"DISABLED");
            return 
ZP_PLUGIN_HANDLED;
        }
        
        if(
g_has_pipe[id])
        {
            if(
get_pcvar_num(cvar_hud) == 1)
            {
                
set_hudmessage(25500, -1.00.5500.02.02.01.0, -1);
                
ShowSyncHudMsg(idg_msgsync"%L"id"ALREADY");
            }
            else
                
client_print(idprint_chat"[ZP] %L"id"ALREADY");
    
            return 
ZP_PLUGIN_HANDLED;
        }
    
        
g_has_pipe[id] = true;
        new 
was cs_get_user_bpammo(idCSW_SMOKEGRENADE);

        if(
was >= 1)
            
cs_set_user_bpammo(idCSW_SMOKEGRENADEwas 1);
        else
            
give_item(id"weapon_smokegrenade");
        
        
replace_models(id);
        
        if(
get_pcvar_num(cvar_hud) == 1)
        {
            new 
msg[32], hud random_num(01);
    
            if(
hud == 0)
                
formatex(msg31"%L"id"DANGEROUS");
            else
                
formatex(msg31"%L"id"GO_EXPLOSIVE");
    
            
set_hudmessage(25500, -1.00.5500.03.02.01.0, -1);
            
ShowSyncHudMsg(idg_msgsync"%s"msg);
        }
    }
    
    if(
item == g_mshield)
    {
        if(!
get_pcvar_num(cvar_Senabled))
        {
            
client_print(idprint_chat"[ZP] %L"id"MS_DISABLED");
            return 
ZP_PLUGIN_HANDLED;
        }
        
        if(
g_has_shield[id])
        {
            if(
get_pcvar_num(cvar_Shud))
            {
                
set_hudmessage(25500, -1.00.5500.02.02.01.0, -1);
                
ShowSyncHudMsg(idg_msgsync"%L"id"ALREADY");
            }
            else
                
client_print(idprint_chat"[ZP] %L"id"ALREADY");
        
            return 
ZP_PLUGIN_HANDLED;
        }
    
        
g_has_shield[id] = true;
    
        if(
get_pcvar_num(cvar_Shud))
        {
            
set_hudmessage(25500, -1.00.5500.03.02.01.0, -1);
            
ShowSyncHudMsg(idg_msgsync"%L"id"PROTECTED");
        }
        else
            
client_print(idprint_chat"[ZP] %L"id"PROTECTED");
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
zp_user_infected_post(id)
{
    
g_has_pipe[id] = false;
    
g_has_shield[id] = false;
}
        
public 
fw_Spawn(id)
{
    
g_has_pipe[id] = false;
    
g_has_shield[id] = false;
}

public 
fw_SetModel(entity, const model[]) // Set smokegrenade pipes effects and type
{
    static 
Float:dmgtimeowner;
    
pev(entitypev_dmgtimedmgtime);
    
owner pev(entitypev_owner);
    
    if(!
pev_valid(entity) || dmgtime == 0.0)
        return 
FMRES_IGNORED;
    
    if (
model[9] == 's' && model[10] == 'm' && g_has_pipe[owner])
    {
        
g_has_pipe[owner] = false;
        
entity_set_model(entityg_wmodel);
        
replace_models2(owner);
        
        
set_rendering(entitykRenderFxGlowShell12800kRenderNormal16);
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW// TE id
        
write_short(entity// entity
        
write_short(g_trail// sprite
        
write_byte(10// life
        
write_byte(10// width
        
write_byte(128// r
        
write_byte(0// g
        
write_byte(0// b
        
write_byte(255// brightness
        
message_end()
        
        
set_pev(entitypev_flTimeStepSoundNADE_TYPE_PIPE);
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
fw_ThinkGren(entity// Grenade think event
{
    if (!
pev_valid(entity))
        return 
HAM_IGNORED;
    
    static 
Float:dmgtimeFloatcurrent_timeattacker;
    
pev(entitypev_dmgtimedmgtime);
    
current_time get_gametime();
    
attacker pev(entitypev_owner);
    
    if(
dmgtime current_time)
        return 
HAM_IGNORED;
    
    if(
pev(entitypev_flTimeStepSound) == NADE_TYPE_PIPE)
    {
        static 
duration;
        
duration pev(entityNADE_DURATION_PIPE);
        
        if (
duration 0)
        {
            new 
Float:originF[3]
            
pev(entitypev_originoriginF);
            
            if (
duration == 1)
            {
                
remove_task(entity);
                
effect(originF);
                
                if (
get_pcvar_num(cvar_mode) == 1)
                    
kill(originFattacker);
                
                
engfunc(EngFunc_RemoveEntityentity);
                return 
HAM_SUPERCEDE;
            }
            
            
light(originFduration);
            
set_task(0.1"hook"entity__"b");
            
            if(
get_pcvar_num(cvar_mode) == 2)
                
set_task(1.0"hurt"entity__"b");
                
            if(
get_pcvar_num(cvar_sound))
            {
                if(
duration == 2)
                    
set_task(0.1"beep"entity__"b");
                else
                    
emit_sound(entityCHAN_WEAPONg_sound1.0ATTN_NORM0PITCH_HIGH);
            }
            
            
set_pev(entityNADE_DURATION_PIPE, --duration);
            
set_pev(entitypev_dmgtimecurrent_time 3.0);
        } else if ((
pev(entitypev_flags) & FL_ONGROUND) && get_speed(entity) < 10)
        {
            
set_pev(entityNADE_DURATION_PIPEget_pcvar_num(cvar_duration)/3);
            
set_pev(entitypev_dmgtimecurrent_time 0.1);
        } else
            
set_pev(entitypev_dmgtimecurrent_time 0.5);
    }
    
    return 
HAM_IGNORED;
}

public 
beep(entity// Plays loop beep sound before explosion
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    
emit_sound(entityCHAN_WEAPONg_sound1.0ATTN_NORM0PITCH_HIGH);
}

public 
hook(entity// Magnet func. Hooks zombies to nade
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius);
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim) || !zp_get_user_zombie(victim) || g_has_shield[victim])
            continue;

        new 
Float:fl_Velocity[3];
        new 
vicOrigin[3], originN[3];

        
get_user_origin(victimvicOrigin);
        
originN[0] = floatround(originF[0]);
        
originN[1] = floatround(originF[1]);
        
originN[2] = floatround(originF[2]);
        
        new 
distance get_distance(originNvicOrigin);

        if (
distance 1)
        {
            new 
Float:fl_Time distance get_pcvar_float(cvar_speed);

            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
        } else
        {
            
fl_Velocity[0] = 0.0
            fl_Velocity
[1] = 0.0
            fl_Velocity
[2] = 0.0
        
}

        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
        
        if(
get_pcvar_num(cvar_shake))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_shake_victim)
            
write_short(1<<14// amplitude
            
write_short(1<<14// duration
            
write_short(1<<14// frequency
            
message_end()
        }
    }
}

public 
hurt(entity// Hurts zombies if mode = 2
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius)/2.0;
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim) || !zp_get_user_zombie(victim) || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
        if(
get_user_health(victim) - get_pcvar_float(cvar_damage) > 0)
            
fakedamage(victim"Pipe Bomb"dam256);
    }
}

public 
kill(const Float:originF[3], attacker// Kills zombies in radius / 2 if mode = 1
{
    static 
Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius) / 2.0;
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim) || !zp_get_user_zombie(victim) || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
set_msg_block(g_deathBLOCK_SET);
        
fakedamage(victim"Pipe Bomb"dam256);
        
set_msg_block(g_deathBLOCK_NOT);
        
        if(
get_user_health(victim) <= 0)
        {
            
SendDeathMsg(attackervictim);
            
            if(
victim != attacker && !zp_get_user_zombie(attacker))
                
UpdateFrags(attacker11);
            else
                
UpdateFrags(attacker, -11);
        }
    }
}

public 
light(const Float:originF[3], duration)  // Blast ring and small red light around nade from zombie_plague40.sma. Great thx, MeRcyLeZZ!!! ;)
{
    
// Lighting
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYoriginF0);
    
write_byte(TE_DLIGHT); // TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]); // x
    
engfunc(EngFunc_WriteCoordoriginF[1]); // y
    
engfunc(EngFunc_WriteCoordoriginF[2]); // z
    
write_byte(5); // radius
    
write_byte(128); // r
    
write_byte(0); // g
    
write_byte(0); // b
    
write_byte(51); //life
    
write_byte((duration 2) ? 0); //decay rate
    
message_end();
    
    
// Smallest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+385.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Medium ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+470.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
}

public 
effect(const Float:originF[3]) // Explosion effect
{
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Explosion sprite
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_EXPLOSION)
    
engfunc(EngFunc_WriteCoordoriginF[0])
    
engfunc(EngFunc_WriteCoordoriginF[1])
    
engfunc(EngFunc_WriteCoordoriginF[2])
    
write_short(g_fire//sprite index
    
write_byte(25// scale in 0.1's
    
write_byte(10// framerate
    
write_byte(0// flags
    
message_end()
}

UpdateFrags(attackerfragsscoreboard// Updates attacker frags
{
    
// Set attacker frags
    
set_pev(attackerpev_fragsfloat(pev(attackerpev_frags) + frags))
    
    if(
get_pcvar_num(cvar_extraap) > 0)
        
zp_set_user_ammo_packs(attackerzp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_extraap));
        
    
// Update scoreboard with attacker and victim info
    
if (scoreboard)
    {
        
message_begin(MSG_BROADCASTg_score)
        
write_byte(attacker// id
        
write_short(pev(attackerpev_frags)) // frags
        
write_short(get_user_deaths(attacker)) // deaths
        
write_short(0// class?
        
write_short(get_user_team(attacker)) // team
        
message_end()
    }
}

SendDeathMsg(attackervictim// Sends death message
{
    
message_begin(MSG_BROADCASTg_death)
    
write_byte(attacker// killer
    
write_byte(victim// victim
    
write_byte(0// headshot flag
    
write_string("Pipe Bomb"// killer's weapon
    
message_end()


EDIT: También cambias la versión pacman
(Este mensaje fue modificado por última vez en: 17/05/2016 12:23 AM por FreDDy.)
17/05/2016 12:21 AM
Encuentra todos sus mensajes Cita este mensaje en tu respuesta
Ivan.-rlz Sin conexión
Miembro


Mensajes: 118
Registro en: Apr 2016
Reputación: 0
Mensaje: #3
RE: Pipe Bomb
Estaba en una tienda que encontré por acá y empece a sacar las cosas para que no sea para zombie plague, ahora edito.
17/05/2016 12:28 AM
Encuentra todos sus mensajes Cita este mensaje en tu respuesta
mmeka12 Sin conexión
Suspendido


Mensajes: 11
Registro en: Sep 2016
Mensaje: #4
RE: Pipe Bomb
necesita algún comando*¿¿
02/10/2016 07:09 PM
Encuentra todos sus mensajes Cita este mensaje en tu respuesta
totopizza Sin conexión
http://www.MexicanServers.com


Donador Forum supporter Trebol verde Trebol de oro 1k
Mensajes: 2,073
Registro en: Mar 2014
Reputación: 40
Mensaje: #5
RE: Pipe Bomb
(02/10/2016 07:09 PM)mmeka12 escribió:  necesita algún comando*¿¿

Porqué no leés el código alv:
Código PHP:
register_clcmd("say /pipe""pipee"

[Imagen: 1098.png]

Estudia siempre; el tiempo es oro, lo material se puede recuperar pero el tiempo no se puede recuperar.
(02/10/2016 05:05 PM)meTaLiCroSS escribió:  Siempre me gusta ayudar cuando alguien esta interesado realmente en ver que esta programando.
(08/08/2019 05:32 PM)meTaLiCroSS escribió:  grax x el dato cr4ck


Mis aportes

PLUGINS
MAPAS
Menú LANG [SF] Sistema de Frags
Say System (Admin Prefix)
02/10/2016 07:12 PM
Visita su sitio web Encuentra todos sus mensajes Cita este mensaje en tu respuesta
Juan' Diego' Sin conexión
Miembro


Trebol verde
Mensajes: 159
Registro en: Aug 2016
Reputación: 5
Mensaje: #6
RE: Pipe Bomb
Estaria buena adaptarlo al Mod TTT Rainbow Grasias me servira para algo :'v Whatever

02/10/2016 07:22 PM
Visita su sitio web Encuentra todos sus mensajes Cita este mensaje en tu respuesta
bobotonr Sin conexión
Miembro Junior


Mensajes: 8
Registro en: Apr 2017
Reputación: 0
Mensaje: #7
RE: Pipe Bomb
(17/05/2016 12:03 AM)Ivan.-rlz escribió:  Capaz a alguien le sea útil esta es la pipe bomb SIN ZOMBIE PLAGUE.

Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fun>

new const PLUGIN[] = "Pipe Bomb"
new const VERSION[] = "0.4b"
new const AUTHOR[] = "4eRT"

const m_pPlayer 41;
new const 
NADE_TYPE_PIPE 4327
new const NADE_DURATION_PIPE pev_flSwimTime
new const g_trailspr[] ="sprites/laserbeam.spr"
new const g_ringspr[] = "sprites/shockwave.spr"
new const g_vmodel[] = "models/v_pipe.mdl"
new const g_pmodel[] = "models/p_pipe.mdl"
new const g_wmodel[] = "models/w_pipe.mdl"
new const g_vflare[] = "models/v_smokegrenade.mdl"

new cvar_durationcvar_radiuscvar_modecvar_damagecvar_speedcvar_shake
new g_trailg_ringg_fireg_scoreg_deathg_shakeboolg_has_pipe[33], boolg_has_shield[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("CurWeapon""Current_Weapon""be""1=1")
    
    
register_forward(FM_SetModel,"fw_SetModel"1)
    
    
RegisterHam(Ham_Item_Deploy"weapon_smokegrenade""fw_smDeploy"1)
    
RegisterHam(Ham_Spawn"player""fw_Spawn")
    
RegisterHam(Ham_Think"grenade""fw_ThinkGren")
    
    
register_clcmd("say /pipe""pipee")
    
    
cvar_duration register_cvar("bb_pipe_duration""4")
    
cvar_radius register_cvar "bb_pipe_radius""200")
    
cvar_mode register_cvar("bb_pipe_mode""1")
    
cvar_damage register_cvar("bb_pipe_damage""50")
    
cvar_speed register_cvar("bb_pipe_speed""90.0")
    
cvar_shake register_cvar("bb_pipe_shake""1")
    
    
g_score get_user_msgid("ScoreInfo")
    
g_death get_user_msgid("DeathMsg")
    
g_shake get_user_msgid("ScreenShake")
}

public 
plugin_precache()
{
    
precache_model(g_vmodel)
    
precache_model(g_pmodel)
    
precache_model(g_wmodel)
    
precache_model(g_vflare)
    
    
g_trail precache_model(g_trailspr)
    
g_ring precache_model(g_ringspr)
}

public 
pipee(id)
{
    
g_has_pipe[id] = true
    give_item
(id"weapon_smokegrenade")
}

public 
Current_Weapon(id
{
    new 
weapon read_data(2)
    
    if(
weapon == CSW_SMOKEGRENADE)
    {
        if(
g_has_pipe[id])
        {
            
set_pev(idpev_viewmodel2g_vmodel)
            
set_pev(idpev_weaponmodel2g_pmodel)
        }
    }
}

public 
replace_models(id)
{
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
    {
        
set_pev(idpev_viewmodel2g_vmodel)
        
set_pev(idpev_weaponmodel2g_pmodel)
    }
}

public 
replace_models2(id)
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
        
set_pev(idpev_viewmodel2g_vflare)
        
public 
fw_smDeploy(const iEntity)
{
    if(
pev_valid(iEntity) != 2)
        return 
HAM_IGNORED;
    
    new 
id get_pdata_cbase(iEntitym_pPlayer4);
    
    if(
g_has_pipe[id] &&/* !zp_get_user_zombie(id) &&*/ is_user_alive(id))
    {
        
set_pev(idpev_viewmodel2g_vmodel);
        
set_pev(idpev_weaponmodel2g_pmodel);
    }
    
    return 
HAM_IGNORED;
}

public 
fw_Spawn(id)
{
    
g_has_pipe[id] = false
    g_has_shield
[id] = false
}

public 
fw_SetModel(entity, const model[]) // Set smokegrenade pipes effects and type
{
    static 
Float:dmgtimeowner;
    
pev(entitypev_dmgtimedmgtime);
    
owner pev(entitypev_owner);
    
    if(!
pev_valid(entity) || dmgtime == 0.0)
        return 
FMRES_IGNORED;
    
    if (
model[9] == 's' && model[10] == 'm' && g_has_pipe[owner])
    {
        
g_has_pipe[owner] = false;
        
entity_set_model(entityg_wmodel);
        
replace_models2(owner);
        
        
set_rendering(entitykRenderFxGlowShell12800kRenderNormal16);
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW// TE id
        
write_short(entity// entity
        
write_short(g_trail// sprite
        
write_byte(10// life
        
write_byte(10// width
        
write_byte(128// r
        
write_byte(50// g
        
write_byte(30// b
        
write_byte(255// brightness
        
message_end()
        
        
set_pev(entitypev_flTimeStepSoundNADE_TYPE_PIPE);
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
fw_ThinkGren(entity// Grenade think event
{
    if (!
pev_valid(entity))
        return 
HAM_IGNORED;
    
    static 
Float:dmgtimeFloatcurrent_timeattacker;
    
pev(entitypev_dmgtimedmgtime);
    
current_time get_gametime();
    
attacker pev(entitypev_owner);
    
    if(
dmgtime current_time)
        return 
HAM_IGNORED;
    
    if(
pev(entitypev_flTimeStepSound) == NADE_TYPE_PIPE)
    {
        static 
duration;
        
duration pev(entityNADE_DURATION_PIPE);
        
        if (
duration 0)
        {
            new 
Float:originF[3]
            
pev(entitypev_originoriginF);
            
            if (
duration == 1)
            {
                
remove_task(entity);
                
effect(originF);
                
                if (
get_pcvar_num(cvar_mode) == 1)
                    
kill(originFattacker);
                
                
engfunc(EngFunc_RemoveEntityentity);
                return 
HAM_SUPERCEDE;
            }
            
            
light(originFduration);
            
set_task(0.1"hook"entity__"b");
            
            if(
get_pcvar_num(cvar_mode) == 2)
                
set_task(1.0"hurt"entity__"b");
                
            if(
duration == 2)
                
set_task(0.1"beep"entity__"b");
            
            
set_pev(entityNADE_DURATION_PIPE, --duration);
            
set_pev(entitypev_dmgtimecurrent_time 3.0);
        } else if ((
pev(entitypev_flags) & FL_ONGROUND) && get_speed(entity) < 10)
        {
            
set_pev(entityNADE_DURATION_PIPEget_pcvar_num(cvar_duration)/3);
            
set_pev(entitypev_dmgtimecurrent_time 0.1);
        } else
            
set_pev(entitypev_dmgtimecurrent_time 0.5);
    }
    
    return 
HAM_IGNORED;
}

public 
beep(entity// Plays loop beep sound before explosion
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
}

public 
hook(entity// Magnet func. Hooks zombies to nade
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius);
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;

        new 
Float:fl_Velocity[3];
        new 
vicOrigin[3], originN[3];

        
get_user_origin(victimvicOrigin);
        
originN[0] = floatround(originF[0]);
        
originN[1] = floatround(originF[1]);
        
originN[2] = floatround(originF[2]);
        
        new 
distance get_distance(originNvicOrigin);

        if (
distance 1)
        {
            new 
Float:fl_Time distance get_pcvar_float(cvar_speed);

            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
        } else
        {
            
fl_Velocity[0] = 0.0
            fl_Velocity
[1] = 0.0
            fl_Velocity
[2] = 0.0
        
}

        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
        
        if(
get_pcvar_num(cvar_shake))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_shake_victim)
            
write_short(1<<14// amplitude
            
write_short(1<<14// duration
            
write_short(1<<14// frequency
            
message_end()
        }
    }
}

public 
hurt(entity// Hurts zombies if mode = 2
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius)/2.0;
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
        if(
get_user_health(victim) - get_pcvar_float(cvar_damage) > 0)
            
fakedamage(victim"Pipe Bomb"dam256);
    }
}

public 
light(const Float:originF[3], duration)  // Blast ring and small red light around nade from zombie_plague40.sma. Great thx, MeRcyLeZZ!!! ;)
{
    
// Lighting
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYoriginF0);
    
write_byte(TE_DLIGHT); // TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]); // x
    
engfunc(EngFunc_WriteCoordoriginF[1]); // y
    
engfunc(EngFunc_WriteCoordoriginF[2]); // z
    
write_byte(5); // radius
    
write_byte(128); // r
    
write_byte(0); // g
    
write_byte(0); // b
    
write_byte(51); //life
    
write_byte((duration 2) ? 0); //decay rate
    
message_end();
    
    
// Smallest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+385.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Medium ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+470.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
}

public 
effect(const Float:originF[3]) // Explosion effect
{
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Explosion sprite
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_EXPLOSION)
    
engfunc(EngFunc_WriteCoordoriginF[0])
    
engfunc(EngFunc_WriteCoordoriginF[1])
    
engfunc(EngFunc_WriteCoordoriginF[2])
    
write_short(g_fire//sprite index
    
write_byte(25// scale in 0.1's
    
write_byte(10// framerate
    
write_byte(0// flags
    
message_end()
}

SendDeathMsg(attackervictim// Sends death message
{
    
message_begin(MSG_BROADCASTg_death)
    
write_byte(attacker// killer
    
write_byte(victim// victim
    
write_byte(0// headshot flag
    
write_string("Pipe Bomb"// killer's weapon
    
message_end()
}

UpdateFrags(attackerfragsscoreboard// Updates attacker frags
{
    
// Set attacker frags
    
set_pev(attackerpev_fragsfloat(pev(attackerpev_frags) + frags))
        
    
// Update scoreboard with attacker and victim info
    
if (scoreboard)
    {
        
message_begin(MSG_BROADCASTg_score)
        
write_byte(attacker// id
        
write_short(pev(attackerpev_frags)) // frags
        
write_short(get_user_deaths(attacker)) // deaths
        
write_short(0// class?
        
write_short(get_user_team(attacker)) // team
        
message_end()
    }
}

public 
kill(const Float:originF[3], attacker// Kills zombies in radius / 2 if mode = 1
{
    static 
Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius) / 2.0;
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
set_msg_block(g_deathBLOCK_SET);
        
fakedamage(victim"Pipe Bomb"dam256);
        
set_msg_block(g_deathBLOCK_NOT);
        
        if(
get_user_health(victim) <= 0)
        {
            
SendDeathMsg(attackervictim);
            
            if(
victim != attacker/* && !zp_get_user_zombie(attacker)*/)
                
UpdateFrags(attacker11);
            else
                
UpdateFrags(attacker, -11);
        }
    }


y los resources en donde estan? xq el puro plugin no me sirb sin los resources pacman
04/08/2019 05:31 PM
Encuentra todos sus mensajes Cita este mensaje en tu respuesta
elpapimejor Sin conexión
Miembro Sr.


Trebol verde
Mensajes: 704
Registro en: Oct 2014
Reputación: 5
Mensaje: #8
RE: Pipe Bomb
(04/08/2019 05:31 PM)bobotonr escribió:  
(17/05/2016 12:03 AM)Ivan.-rlz escribió:  Capaz a alguien le sea útil esta es la pipe bomb SIN ZOMBIE PLAGUE.

Código PHP:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fun>

new const PLUGIN[] = "Pipe Bomb"
new const VERSION[] = "0.4b"
new const AUTHOR[] = "4eRT"

const m_pPlayer 41;
new const 
NADE_TYPE_PIPE 4327
new const NADE_DURATION_PIPE pev_flSwimTime
new const g_trailspr[] ="sprites/laserbeam.spr"
new const g_ringspr[] = "sprites/shockwave.spr"
new const g_vmodel[] = "models/v_pipe.mdl"
new const g_pmodel[] = "models/p_pipe.mdl"
new const g_wmodel[] = "models/w_pipe.mdl"
new const g_vflare[] = "models/v_smokegrenade.mdl"

new cvar_durationcvar_radiuscvar_modecvar_damagecvar_speedcvar_shake
new g_trailg_ringg_fireg_scoreg_deathg_shakeboolg_has_pipe[33], boolg_has_shield[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("CurWeapon""Current_Weapon""be""1=1")
    
    
register_forward(FM_SetModel,"fw_SetModel"1)
    
    
RegisterHam(Ham_Item_Deploy"weapon_smokegrenade""fw_smDeploy"1)
    
RegisterHam(Ham_Spawn"player""fw_Spawn")
    
RegisterHam(Ham_Think"grenade""fw_ThinkGren")
    
    
register_clcmd("say /pipe""pipee")
    
    
cvar_duration register_cvar("bb_pipe_duration""4")
    
cvar_radius register_cvar "bb_pipe_radius""200")
    
cvar_mode register_cvar("bb_pipe_mode""1")
    
cvar_damage register_cvar("bb_pipe_damage""50")
    
cvar_speed register_cvar("bb_pipe_speed""90.0")
    
cvar_shake register_cvar("bb_pipe_shake""1")
    
    
g_score get_user_msgid("ScoreInfo")
    
g_death get_user_msgid("DeathMsg")
    
g_shake get_user_msgid("ScreenShake")
}

public 
plugin_precache()
{
    
precache_model(g_vmodel)
    
precache_model(g_pmodel)
    
precache_model(g_wmodel)
    
precache_model(g_vflare)
    
    
g_trail precache_model(g_trailspr)
    
g_ring precache_model(g_ringspr)
}

public 
pipee(id)
{
    
g_has_pipe[id] = true
    give_item
(id"weapon_smokegrenade")
}

public 
Current_Weapon(id
{
    new 
weapon read_data(2)
    
    if(
weapon == CSW_SMOKEGRENADE)
    {
        if(
g_has_pipe[id])
        {
            
set_pev(idpev_viewmodel2g_vmodel)
            
set_pev(idpev_weaponmodel2g_pmodel)
        }
    }
}

public 
replace_models(id)
{
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
    {
        
set_pev(idpev_viewmodel2g_vmodel)
        
set_pev(idpev_weaponmodel2g_pmodel)
    }
}

public 
replace_models2(id)
    if(
get_user_weapon(id) == CSW_SMOKEGRENADE)
        
set_pev(idpev_viewmodel2g_vflare)
        
public 
fw_smDeploy(const iEntity)
{
    if(
pev_valid(iEntity) != 2)
        return 
HAM_IGNORED;
    
    new 
id get_pdata_cbase(iEntitym_pPlayer4);
    
    if(
g_has_pipe[id] &&/* !zp_get_user_zombie(id) &&*/ is_user_alive(id))
    {
        
set_pev(idpev_viewmodel2g_vmodel);
        
set_pev(idpev_weaponmodel2g_pmodel);
    }
    
    return 
HAM_IGNORED;
}

public 
fw_Spawn(id)
{
    
g_has_pipe[id] = false
    g_has_shield
[id] = false
}

public 
fw_SetModel(entity, const model[]) // Set smokegrenade pipes effects and type
{
    static 
Float:dmgtimeowner;
    
pev(entitypev_dmgtimedmgtime);
    
owner pev(entitypev_owner);
    
    if(!
pev_valid(entity) || dmgtime == 0.0)
        return 
FMRES_IGNORED;
    
    if (
model[9] == 's' && model[10] == 'm' && g_has_pipe[owner])
    {
        
g_has_pipe[owner] = false;
        
entity_set_model(entityg_wmodel);
        
replace_models2(owner);
        
        
set_rendering(entitykRenderFxGlowShell12800kRenderNormal16);
        
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BEAMFOLLOW// TE id
        
write_short(entity// entity
        
write_short(g_trail// sprite
        
write_byte(10// life
        
write_byte(10// width
        
write_byte(128// r
        
write_byte(50// g
        
write_byte(30// b
        
write_byte(255// brightness
        
message_end()
        
        
set_pev(entitypev_flTimeStepSoundNADE_TYPE_PIPE);
        
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
fw_ThinkGren(entity// Grenade think event
{
    if (!
pev_valid(entity))
        return 
HAM_IGNORED;
    
    static 
Float:dmgtimeFloatcurrent_timeattacker;
    
pev(entitypev_dmgtimedmgtime);
    
current_time get_gametime();
    
attacker pev(entitypev_owner);
    
    if(
dmgtime current_time)
        return 
HAM_IGNORED;
    
    if(
pev(entitypev_flTimeStepSound) == NADE_TYPE_PIPE)
    {
        static 
duration;
        
duration pev(entityNADE_DURATION_PIPE);
        
        if (
duration 0)
        {
            new 
Float:originF[3]
            
pev(entitypev_originoriginF);
            
            if (
duration == 1)
            {
                
remove_task(entity);
                
effect(originF);
                
                if (
get_pcvar_num(cvar_mode) == 1)
                    
kill(originFattacker);
                
                
engfunc(EngFunc_RemoveEntityentity);
                return 
HAM_SUPERCEDE;
            }
            
            
light(originFduration);
            
set_task(0.1"hook"entity__"b");
            
            if(
get_pcvar_num(cvar_mode) == 2)
                
set_task(1.0"hurt"entity__"b");
                
            if(
duration == 2)
                
set_task(0.1"beep"entity__"b");
            
            
set_pev(entityNADE_DURATION_PIPE, --duration);
            
set_pev(entitypev_dmgtimecurrent_time 3.0);
        } else if ((
pev(entitypev_flags) & FL_ONGROUND) && get_speed(entity) < 10)
        {
            
set_pev(entityNADE_DURATION_PIPEget_pcvar_num(cvar_duration)/3);
            
set_pev(entitypev_dmgtimecurrent_time 0.1);
        } else
            
set_pev(entitypev_dmgtimecurrent_time 0.5);
    }
    
    return 
HAM_IGNORED;
}

public 
beep(entity// Plays loop beep sound before explosion
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
}

public 
hook(entity// Magnet func. Hooks zombies to nade
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius);
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;

        new 
Float:fl_Velocity[3];
        new 
vicOrigin[3], originN[3];

        
get_user_origin(victimvicOrigin);
        
originN[0] = floatround(originF[0]);
        
originN[1] = floatround(originF[1]);
        
originN[2] = floatround(originF[2]);
        
        new 
distance get_distance(originNvicOrigin);

        if (
distance 1)
        {
            new 
Float:fl_Time distance get_pcvar_float(cvar_speed);

            
fl_Velocity[0] = (originN[0] - vicOrigin[0]) / fl_Time;
            
fl_Velocity[1] = (originN[1] - vicOrigin[1]) / fl_Time;
            
fl_Velocity[2] = (originN[2] - vicOrigin[2]) / fl_Time;
        } else
        {
            
fl_Velocity[0] = 0.0
            fl_Velocity
[1] = 0.0
            fl_Velocity
[2] = 0.0
        
}

        
entity_set_vector(victimEV_VEC_velocityfl_Velocity);
        
        if(
get_pcvar_num(cvar_shake))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_shake_victim)
            
write_short(1<<14// amplitude
            
write_short(1<<14// duration
            
write_short(1<<14// frequency
            
message_end()
        }
    }
}

public 
hurt(entity// Hurts zombies if mode = 2
{
    
//Bugfix
    
if (!pev_valid(entity))
    {
        
remove_task(entity);
        return;
    }
    
    static 
Float:originF[3], Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius)/2.0;
    
pev(entitypev_originoriginF);
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
        if(
get_user_health(victim) - get_pcvar_float(cvar_damage) > 0)
            
fakedamage(victim"Pipe Bomb"dam256);
    }
}

public 
light(const Float:originF[3], duration)  // Blast ring and small red light around nade from zombie_plague40.sma. Great thx, MeRcyLeZZ!!! ;)
{
    
// Lighting
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYoriginF0);
    
write_byte(TE_DLIGHT); // TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]); // x
    
engfunc(EngFunc_WriteCoordoriginF[1]); // y
    
engfunc(EngFunc_WriteCoordoriginF[2]); // z
    
write_byte(5); // radius
    
write_byte(128); // r
    
write_byte(0); // g
    
write_byte(0); // b
    
write_byte(51); //life
    
write_byte((duration 2) ? 0); //decay rate
    
message_end();
    
    
// Smallest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+385.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Medium ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+470.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
}

public 
effect(const Float:originF[3]) // Explosion effect
{
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF[2]+555.0// z axis
    
write_short(g_ring// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(128// red
    
write_byte(0// green
    
write_byte(0// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
    
    
// Explosion sprite
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_EXPLOSION)
    
engfunc(EngFunc_WriteCoordoriginF[0])
    
engfunc(EngFunc_WriteCoordoriginF[1])
    
engfunc(EngFunc_WriteCoordoriginF[2])
    
write_short(g_fire//sprite index
    
write_byte(25// scale in 0.1's
    
write_byte(10// framerate
    
write_byte(0// flags
    
message_end()
}

SendDeathMsg(attackervictim// Sends death message
{
    
message_begin(MSG_BROADCASTg_death)
    
write_byte(attacker// killer
    
write_byte(victim// victim
    
write_byte(0// headshot flag
    
write_string("Pipe Bomb"// killer's weapon
    
message_end()
}

UpdateFrags(attackerfragsscoreboard// Updates attacker frags
{
    
// Set attacker frags
    
set_pev(attackerpev_fragsfloat(pev(attackerpev_frags) + frags))
        
    
// Update scoreboard with attacker and victim info
    
if (scoreboard)
    {
        
message_begin(MSG_BROADCASTg_score)
        
write_byte(attacker// id
        
write_short(pev(attackerpev_frags)) // frags
        
write_short(get_user_deaths(attacker)) // deaths
        
write_short(0// class?
        
write_short(get_user_team(attacker)) // team
        
message_end()
    }
}

public 
kill(const Float:originF[3], attacker// Kills zombies in radius / 2 if mode = 1
{
    static 
Float:radiusvictim = -1;
    
radius get_pcvar_float(cvar_radius) / 2.0;
    
    while ((
victim engfunc(EngFunc_FindEntityInSpherevictimoriginFradius)) != 0)
    {
        if (!
is_user_alive(victim/*|| !zp_get_user_zombie(victim)*/ || g_has_shield[victim])
            continue;
        
        new 
Float:dam get_pcvar_float(cvar_damage);
        
set_msg_block(g_deathBLOCK_SET);
        
fakedamage(victim"Pipe Bomb"dam256);
        
set_msg_block(g_deathBLOCK_NOT);
        
        if(
get_user_health(victim) <= 0)
        {
            
SendDeathMsg(attackervictim);
            
            if(
victim != attacker/* && !zp_get_user_zombie(attacker)*/)
                
UpdateFrags(attacker11);
            else
                
UpdateFrags(attacker, -11);
        }
    }


y los resources en donde estan? xq el puro plugin no me sirb sin los resources pacman

Ni para buscar unos putos recursos que se consiguen en cualquier lado sirves.

(03/08/2018 03:13 PM)Skylar escribió:  Está bien que pidas ayudas, pero no para que crees 20 post todos los días mogolico de mierda, me tenes re podrido ya, contraté 10000 sicarios para que te busquen y te maten toda la familia, y a vos que te revienten con una bazooka.
08/08/2019 10:33 PM
Encuentra todos sus mensajes Cita este mensaje en tu respuesta
Enviar respuesta 


Salto de foro:


Usuario(s) navegando en este tema: 1 invitado(s)

Contáctanos | Allied Modders en español | Volver arriba | Volver al contenido | Archivo (Modo simple) | Sindicación RSS