Post by killer on Jan 17, 2024 22:25:48 GMT
#incluir <amxmodx>
#incluir <diversión>
#incluir <fakemeta>
#incluir <hamsandwich> #incluir
<amx_settings_api>
#incluir <cs_weap_models_api>
#incluir <zombieplague>
#incluir <zp50_items>
#incluir <zp50_gamemodes>
nuevo const gNazwaPluginu[] = "Complemento [ZP]: Bomba Antídoto";
nueva constante gWersjaPluginu[] = "1.0";
nueva const gAutorPluginu[] = "MisieQ";
#define ITEM_NAME "Bomba Antídoto"
#define ITEM_COST 15
#define MODEL_MAX_LENGTH 64
#define SOUND_MAX_LENGTH 64
#define SPRITE_MAX_LENGTH 64
new const ZP_SETTINGS_FILE[] = "zombieplague.ini"
new const sound_grenade_antidote_explode[][] = { "zombie_plague/grenade_anti dote.wav" }
nuevo const sound_grenade_antidote_player[][] = { "zombie_plague/player_antidote.wav" }
nuevo g_model_grenade_antidote[MODEL_MAX_LENGTH] = "models/zombie_plague/v_grenade_antidote.mdl"
nuevo g_sprite_grenade_trail[SPRITE_MAX_LENGTH] = "sprites/laserbe am.spr"
nuevo g_sprite_grenade_ring[SPRITE_MAX_LENGTH ] = "sprites/shockwave.spr"
nuevo Array:g_sound_antidote_explode
nuevo Array:g_sound_antidote_player
const Float:NADE_EXPLOSION_RADIUS = 240.0
const PEV_NADE_TYPE = pev_flTimeStepSound
const NADE_TYPE_ANTIDOTE = 6969
nuevo g_ItemID, g_trailSpr, g_explo Spr, Antídoto[33];
nuevo g_AntidoteBombCounter, cvar_antidote_bomb_round_limit;
plugin_init público() {
registro_plugin(gNazwaPluginu, gWersjaPluginu, gAutorPluginu);
Register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
registrarse_forward(FM_SetModel, "fw_SetModel");
RegisterHam(Ham_Think, "granada", "fw_ThinkGrenade");
RegisterHam(Ham_Killed, "jugador", "fw_PlayerKilled")
RegisterHam(Ham_Item_Deploy, "weapon_hegrenade", "fw_ItemDeploy",1);
g_ItemID = zp_items_register(ITEM_NAME, ITEM_COST);
cvar_antidote_bomb_round_limit = Register_cvar("zp_antidote_bomb_round_limit", "8");
}
public plugin_precache()
{
g_sound_antidote_explode = ArrayCreate(SOUND_MAX_LENGTH, 1)
g_sound_antidote_player = ArrayCreate(SOUND_MAX_LENGTH, 1)
amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sonidos", "GRENADE ANTIDOTO EXPLODE", g_sound_antidote_explode)
amx_ load_setting_string_arr(ZP_SETTINGS_FILE, "Sonidos", "REPRODUCTOR DE ANTIDOTO DE GRANADA ",
amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "GRENADE ANTIDOTE EXPLODE", g_sound_antidote_explode)
}
if (ArraySize(g_sound_antidote_player) == 0)
{
for (index = 0; index < sizeof sound_grenade_antidote_player; index++)
ArrayPushString(g_sound_antidote_play es decir, sound_grenade_antidote_player[índice])
// Guardar en un archivo externo
amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "GRENADE ANTIDOTE PLAYER", g_sound_antidote_player)
}
if (!amx_load_setting_string(ZP_SETTINGS_FILE, "Weapon Models", "GRENADE ANTIDOTE", g_model_grenade_antidote, charsmax(g_model_grenade_antidote) ))
amx_save_setting_string( ZP_SETTINGS_FILE, "Modelos de armas", "ANTÍDOTO DE GRANADA", g_model_grenade_antidote)
if (!amx_load_setting_string(ZP_SETTINGS_FILE, "Grenade Sprites", "TRAIL", g_sprite_grenade_trail, charsmax(g_sprite_grenade_trail)))
amx_save_setting_string(ZP_SETTINGS_FILE , "Sprites de granada", "SENDERO" , g_sprite_grenade_trail)
if (!amx_load_setting_string(ZP_SETTINGS_FILE, "Grenade Sprites", "RING", g_sprite_grenade_ring, charsmax(g_sprite_grenade_ring)))
amx_save_setting_string(ZP_SETTINGS_FILE, "Grenade Sprites", "RING", g_sprite_grenade_ring)
nuevo sonido[SOUND_MAX_LENGTH]
para (índice = 0; índice < ArraySize(g_sound_antidote_explode); index++)
{
ArrayGetString(g_sound_antidote_explode, index, sound, charsmax(sound))
precache_sound(sonido)
}
for (index = 0; index < ArraySize(g_sound_antidote_player); index++)
{
ArrayGetString(g_sound_antidote_player, index, sound, charsmax(sound))
precache_sound(sonido)
}
precache_model(g_model_grenade_antidote)
g_trailSpr = precache_model(g_sprite_grenade_trail)
g_exploSpr = precache_model(g_sprite_grenade_ring)
}
public client_disconnected(id)
{
Antidote[id] = 0
}
public event_round_start()
{
g_AntidoteBombCounter = 0
}
público zp_fw_items_select_pre(id, id de elemento , ignorar costo)
{
if (itemid! = g_ItemID)
return ZP_ITEM_AVAILABLE;
si (zp_core_is_zombie(id))
devuelve ZP_ITEM_DONT_SHOW;
texto estático[32]
formatex(texto, charsmax(texto), "[%d/%d]", g_AntidoteBombCounter,
get_pcvar_num(cvar_antidote_bomb_round_limit)) zp_items_menu_text_add(text)
if (g_AntidoteBombCounter >= get_pcvar_num(cvar_antidote_bomb_round_limit))
return ZP_ITEM_NOT_AVAILABLE;
devolver ZP_ITEM_AVAILABLE;
}
public zp_fw_items_select_post(id, itemid, ignorecost)
{
si (itemid! = g_ItemID)
retorno;
Give_item(id, "weapon_hegrenade")
Antídoto[id] = 1
g_AntidoteBombCounter++
}
public fw_ItemDeploy(wpn)
{
if(Antidote[pev(wpn,pev_owner)])
set_pev(pev(wpn,pev_owner),pev_viewmodel2,g_model_grenade_antidote)
}
public fw_SetModel (entidad, modelo const[])
{
if (strlen(modelo) < 8)
retorno;
si (modelo[7]!= 'w' || modelo[8]!= '_')
retorno;
Flotador estático:dmgtime
pev(entidad, pev_dmgtime, dmgtime)
if (dmgtime == 0.0)
return;
if (zp_core_is_zombie(pev(entidad, pev_owner)))
retorno;
if (modelo[9] == 'h' && modelo[10] == 'e')
{
if(Antidote[pev(entidad, pev_owner)])
{
fm_set_rendering(entidad, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, dieciséis);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entidad) // entidad
write_short(g_trailSpr) // sprite
write_byte(10) // vida
write_byte(10) // ancho
write_byte(255) // r
write_byte (128) // g
write_byte(0) // b
write_byte(200) // brillo
message_end()
// Establece el tipo de granada en la entidad de granada lanzada
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_ANTIDOTE)
}
}
}
public fw_ThinkGrenade(entity)
{
si (!pev_valid(entidad))
devuelve HAM_IGNORED;
Flotador estático:dmgtime
pev(entidad, pev_dmgtime, dmgtime)
if (dmgtime > get_gametime())
return HAM_IGNORED;
switch (pev(entidad, PEV_NADE_TYPE))
{
case NADE_TYPE_ANTIDOTE:
{
cure_explode(entidad)
return HAM_SUPERCEDE;
}
}
devuelve HAM_IGNORED;
}
public fw_PlayerKilled(víctima, atacante, deberíagib)
{
Antídoto[víctima] = 0
}
cure_explode(ent)
{
if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE)
{
engfunc(EngFunc_RemoveEntity, ent)
return;
}
static Float:origen[3]
pev(ent, pev_origin, origin)
create_blast(origen)
sonido estático[SOUND_MAX_LENGTH]
ArrayGetString(g_sound_antidote_explode, random_num(0, ArraySize(g_sound_antidote_explode) - 1), sonido, charsmax(sonido))
emit_sound( ent, CHAN_WEAPON, sonido, 1.0, ATTN_NORM, 0, PITCH_NORM)
nuevo atacante = pev(ent, pev_owner)
Antídoto[atacante] = 0
if (!is_user_connected(atacante) || zp_core_is_zombie(atacante))
{
engfunc(EngFunc_RemoveEntity, ent)
return;
}
nueva víctima = -1
while ((víctima = engfunc(EngFunc_FindEntityInSphere, víctima, origen, NADE_EXPLOSION_RADIUS)) != 0)
{
if (!is_user_alive(víctima) || !zp_core_is_zombie(víctima) || zp_core_is_first_zombie(víctima) || zp_core_is_last_zombie (víctima) || zp_get_user_nemesis(víctima))
continuar;
if (zp_core_get_zombie_count() == 1)
{
ExecuteHamB(Ham_Killed, víctima, atacante, 0)
continúa;
}
zp_core_cure(víctima, atacante)
ArrayGetString(g_sound_antidote_player, random_num(0, ArraySize(g_sound_antidote_player) - 1), sonido, charsmax(sonido))
emit_sound(víctima, CHAN_VOICE, sonido, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
engfunc(EngFunc_RemoveEnt idad , ent)
}
create_blast(const Float:origin[3])
{
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_BEAMCYLINDER) // ID de TE
engfunc(EngFunc_WriteCoord, origen[0]) // x
engfunc(EngFunc_WriteCoord , origen[1]) // y
engfunc(EngFunc_WriteCoord, origen[2]) // z
engfunc(EngFunc_WriteCoord, origen[0]) // eje x
engfunc(EngFunc_WriteCoord, origen[1]) // eje y
engfunc(EngFunc_WriteCoord , origen[2]+385.0) // eje z
write_short(g_exploSpr) // sprite
write_byte(0) // marco inicial
write_byte(0) // framerate
write_byte(4) // vida
write_byte(60) // ancho
write_byte(0 ) // ruido
write_byte(255) // rojo
write_byte(128) // verde
write_byte(0) // azul
write_byte(200) // brillo
write_byte(0) // velocidad
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origen, 0)
write_byte(TE_BEAMCYLINDER) // ID de TE
engfunc(EngFunc_WriteCoord, origen[0]) // x
engfunc(EngFunc_WriteCoord, origen[1]) // y
engfunc(EngFunc_WriteCoord, origen[2]) // z
engfunc( EngFunc_WriteCoord, origen[0]) // eje x
engfunc(EngFunc_WriteCoord, origen[1]) // eje y
engfunc(EngFunc_WriteCoord, origen[2]+470.0) // eje z
write_short(g_exploSpr) // sprite
write_byte(0) // marco inicial
write_byte(0) // framerate
write_byte(4) // vida
write_byte(60) // ancho
write_byte(0) // ruido
write_byte(255) // rojo
write_byte(164) // verde
write_byte(0) / / azul
write_byte(200) // brillo
write_byte(0) // velocidad
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origen, 0)
write_byte(TE_BEAMCYLINDER) // ID de TE
engfunc(EngFunc_WriteCoord, origen[0]) // x
engfunc(EngFunc_WriteCoord, origen[1]) // y
engfunc(EngFunc_WriteCoord , origen[2]) // z
engfunc(EngFunc_WriteCoord, origen[0]) // eje x
engfunc(EngFunc_WriteCoord, origen[1]) // eje y
engfunc(EngFunc_WriteCoord, origen[2]+555.0) // eje z
write_short(g_exploSpr) // sprite
write_byte(0) // marco inicial
write_byte(0) // framerate
write_byte(4) // vida
write_byte(60) // ancho
write_byte(0) // ruido
write_byte(255) // rojo
write_byte (200) // verde
write_byte(0) // azul
write_byte(200) // brillo
write_byte(0) // velocidad
message_end()
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, cantidad = 16)
{
static Float:color[3]
color[0] = float(r)
color[1] = float(g)
color[2] = float(b)
set_pev(entity, pev_renderfx , fx)
set_pev(entidad, pev_rendercolor, color)
set_pev(entidad, pev_rendermode, render)
set_pev(entidad, pev_renderamt, float(cantidad))
}
#incluir <diversión>
#incluir <fakemeta>
#incluir <hamsandwich> #incluir
<amx_settings_api>
#incluir <cs_weap_models_api>
#incluir <zombieplague>
#incluir <zp50_items>
#incluir <zp50_gamemodes>
nuevo const gNazwaPluginu[] = "Complemento [ZP]: Bomba Antídoto";
nueva constante gWersjaPluginu[] = "1.0";
nueva const gAutorPluginu[] = "MisieQ";
#define ITEM_NAME "Bomba Antídoto"
#define ITEM_COST 15
#define MODEL_MAX_LENGTH 64
#define SOUND_MAX_LENGTH 64
#define SPRITE_MAX_LENGTH 64
new const ZP_SETTINGS_FILE[] = "zombieplague.ini"
new const sound_grenade_antidote_explode[][] = { "zombie_plague/grenade_anti dote.wav" }
nuevo const sound_grenade_antidote_player[][] = { "zombie_plague/player_antidote.wav" }
nuevo g_model_grenade_antidote[MODEL_MAX_LENGTH] = "models/zombie_plague/v_grenade_antidote.mdl"
nuevo g_sprite_grenade_trail[SPRITE_MAX_LENGTH] = "sprites/laserbe am.spr"
nuevo g_sprite_grenade_ring[SPRITE_MAX_LENGTH ] = "sprites/shockwave.spr"
nuevo Array:g_sound_antidote_explode
nuevo Array:g_sound_antidote_player
const Float:NADE_EXPLOSION_RADIUS = 240.0
const PEV_NADE_TYPE = pev_flTimeStepSound
const NADE_TYPE_ANTIDOTE = 6969
nuevo g_ItemID, g_trailSpr, g_explo Spr, Antídoto[33];
nuevo g_AntidoteBombCounter, cvar_antidote_bomb_round_limit;
plugin_init público() {
registro_plugin(gNazwaPluginu, gWersjaPluginu, gAutorPluginu);
Register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
registrarse_forward(FM_SetModel, "fw_SetModel");
RegisterHam(Ham_Think, "granada", "fw_ThinkGrenade");
RegisterHam(Ham_Killed, "jugador", "fw_PlayerKilled")
RegisterHam(Ham_Item_Deploy, "weapon_hegrenade", "fw_ItemDeploy",1);
g_ItemID = zp_items_register(ITEM_NAME, ITEM_COST);
cvar_antidote_bomb_round_limit = Register_cvar("zp_antidote_bomb_round_limit", "8");
}
public plugin_precache()
{
g_sound_antidote_explode = ArrayCreate(SOUND_MAX_LENGTH, 1)
g_sound_antidote_player = ArrayCreate(SOUND_MAX_LENGTH, 1)
amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sonidos", "GRENADE ANTIDOTO EXPLODE", g_sound_antidote_explode)
amx_ load_setting_string_arr(ZP_SETTINGS_FILE, "Sonidos", "REPRODUCTOR DE ANTIDOTO DE GRANADA ",
amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "GRENADE ANTIDOTE EXPLODE", g_sound_antidote_explode)
}
if (ArraySize(g_sound_antidote_player) == 0)
{
for (index = 0; index < sizeof sound_grenade_antidote_player; index++)
ArrayPushString(g_sound_antidote_play es decir, sound_grenade_antidote_player[índice])
// Guardar en un archivo externo
amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "GRENADE ANTIDOTE PLAYER", g_sound_antidote_player)
}
if (!amx_load_setting_string(ZP_SETTINGS_FILE, "Weapon Models", "GRENADE ANTIDOTE", g_model_grenade_antidote, charsmax(g_model_grenade_antidote) ))
amx_save_setting_string( ZP_SETTINGS_FILE, "Modelos de armas", "ANTÍDOTO DE GRANADA", g_model_grenade_antidote)
if (!amx_load_setting_string(ZP_SETTINGS_FILE, "Grenade Sprites", "TRAIL", g_sprite_grenade_trail, charsmax(g_sprite_grenade_trail)))
amx_save_setting_string(ZP_SETTINGS_FILE , "Sprites de granada", "SENDERO" , g_sprite_grenade_trail)
if (!amx_load_setting_string(ZP_SETTINGS_FILE, "Grenade Sprites", "RING", g_sprite_grenade_ring, charsmax(g_sprite_grenade_ring)))
amx_save_setting_string(ZP_SETTINGS_FILE, "Grenade Sprites", "RING", g_sprite_grenade_ring)
nuevo sonido[SOUND_MAX_LENGTH]
para (índice = 0; índice < ArraySize(g_sound_antidote_explode); index++)
{
ArrayGetString(g_sound_antidote_explode, index, sound, charsmax(sound))
precache_sound(sonido)
}
for (index = 0; index < ArraySize(g_sound_antidote_player); index++)
{
ArrayGetString(g_sound_antidote_player, index, sound, charsmax(sound))
precache_sound(sonido)
}
precache_model(g_model_grenade_antidote)
g_trailSpr = precache_model(g_sprite_grenade_trail)
g_exploSpr = precache_model(g_sprite_grenade_ring)
}
public client_disconnected(id)
{
Antidote[id] = 0
}
public event_round_start()
{
g_AntidoteBombCounter = 0
}
público zp_fw_items_select_pre(id, id de elemento , ignorar costo)
{
if (itemid! = g_ItemID)
return ZP_ITEM_AVAILABLE;
si (zp_core_is_zombie(id))
devuelve ZP_ITEM_DONT_SHOW;
texto estático[32]
formatex(texto, charsmax(texto), "[%d/%d]", g_AntidoteBombCounter,
get_pcvar_num(cvar_antidote_bomb_round_limit)) zp_items_menu_text_add(text)
if (g_AntidoteBombCounter >= get_pcvar_num(cvar_antidote_bomb_round_limit))
return ZP_ITEM_NOT_AVAILABLE;
devolver ZP_ITEM_AVAILABLE;
}
public zp_fw_items_select_post(id, itemid, ignorecost)
{
si (itemid! = g_ItemID)
retorno;
Give_item(id, "weapon_hegrenade")
Antídoto[id] = 1
g_AntidoteBombCounter++
}
public fw_ItemDeploy(wpn)
{
if(Antidote[pev(wpn,pev_owner)])
set_pev(pev(wpn,pev_owner),pev_viewmodel2,g_model_grenade_antidote)
}
public fw_SetModel (entidad, modelo const[])
{
if (strlen(modelo) < 8)
retorno;
si (modelo[7]!= 'w' || modelo[8]!= '_')
retorno;
Flotador estático:dmgtime
pev(entidad, pev_dmgtime, dmgtime)
if (dmgtime == 0.0)
return;
if (zp_core_is_zombie(pev(entidad, pev_owner)))
retorno;
if (modelo[9] == 'h' && modelo[10] == 'e')
{
if(Antidote[pev(entidad, pev_owner)])
{
fm_set_rendering(entidad, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, dieciséis);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entidad) // entidad
write_short(g_trailSpr) // sprite
write_byte(10) // vida
write_byte(10) // ancho
write_byte(255) // r
write_byte (128) // g
write_byte(0) // b
write_byte(200) // brillo
message_end()
// Establece el tipo de granada en la entidad de granada lanzada
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_ANTIDOTE)
}
}
}
public fw_ThinkGrenade(entity)
{
si (!pev_valid(entidad))
devuelve HAM_IGNORED;
Flotador estático:dmgtime
pev(entidad, pev_dmgtime, dmgtime)
if (dmgtime > get_gametime())
return HAM_IGNORED;
switch (pev(entidad, PEV_NADE_TYPE))
{
case NADE_TYPE_ANTIDOTE:
{
cure_explode(entidad)
return HAM_SUPERCEDE;
}
}
devuelve HAM_IGNORED;
}
public fw_PlayerKilled(víctima, atacante, deberíagib)
{
Antídoto[víctima] = 0
}
cure_explode(ent)
{
if (zp_gamemodes_get_current() == ZP_NO_GAME_MODE)
{
engfunc(EngFunc_RemoveEntity, ent)
return;
}
static Float:origen[3]
pev(ent, pev_origin, origin)
create_blast(origen)
sonido estático[SOUND_MAX_LENGTH]
ArrayGetString(g_sound_antidote_explode, random_num(0, ArraySize(g_sound_antidote_explode) - 1), sonido, charsmax(sonido))
emit_sound( ent, CHAN_WEAPON, sonido, 1.0, ATTN_NORM, 0, PITCH_NORM)
nuevo atacante = pev(ent, pev_owner)
Antídoto[atacante] = 0
if (!is_user_connected(atacante) || zp_core_is_zombie(atacante))
{
engfunc(EngFunc_RemoveEntity, ent)
return;
}
nueva víctima = -1
while ((víctima = engfunc(EngFunc_FindEntityInSphere, víctima, origen, NADE_EXPLOSION_RADIUS)) != 0)
{
if (!is_user_alive(víctima) || !zp_core_is_zombie(víctima) || zp_core_is_first_zombie(víctima) || zp_core_is_last_zombie (víctima) || zp_get_user_nemesis(víctima))
continuar;
if (zp_core_get_zombie_count() == 1)
{
ExecuteHamB(Ham_Killed, víctima, atacante, 0)
continúa;
}
zp_core_cure(víctima, atacante)
ArrayGetString(g_sound_antidote_player, random_num(0, ArraySize(g_sound_antidote_player) - 1), sonido, charsmax(sonido))
emit_sound(víctima, CHAN_VOICE, sonido, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
engfunc(EngFunc_RemoveEnt idad , ent)
}
create_blast(const Float:origin[3])
{
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_BEAMCYLINDER) // ID de TE
engfunc(EngFunc_WriteCoord, origen[0]) // x
engfunc(EngFunc_WriteCoord , origen[1]) // y
engfunc(EngFunc_WriteCoord, origen[2]) // z
engfunc(EngFunc_WriteCoord, origen[0]) // eje x
engfunc(EngFunc_WriteCoord, origen[1]) // eje y
engfunc(EngFunc_WriteCoord , origen[2]+385.0) // eje z
write_short(g_exploSpr) // sprite
write_byte(0) // marco inicial
write_byte(0) // framerate
write_byte(4) // vida
write_byte(60) // ancho
write_byte(0 ) // ruido
write_byte(255) // rojo
write_byte(128) // verde
write_byte(0) // azul
write_byte(200) // brillo
write_byte(0) // velocidad
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origen, 0)
write_byte(TE_BEAMCYLINDER) // ID de TE
engfunc(EngFunc_WriteCoord, origen[0]) // x
engfunc(EngFunc_WriteCoord, origen[1]) // y
engfunc(EngFunc_WriteCoord, origen[2]) // z
engfunc( EngFunc_WriteCoord, origen[0]) // eje x
engfunc(EngFunc_WriteCoord, origen[1]) // eje y
engfunc(EngFunc_WriteCoord, origen[2]+470.0) // eje z
write_short(g_exploSpr) // sprite
write_byte(0) // marco inicial
write_byte(0) // framerate
write_byte(4) // vida
write_byte(60) // ancho
write_byte(0) // ruido
write_byte(255) // rojo
write_byte(164) // verde
write_byte(0) / / azul
write_byte(200) // brillo
write_byte(0) // velocidad
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origen, 0)
write_byte(TE_BEAMCYLINDER) // ID de TE
engfunc(EngFunc_WriteCoord, origen[0]) // x
engfunc(EngFunc_WriteCoord, origen[1]) // y
engfunc(EngFunc_WriteCoord , origen[2]) // z
engfunc(EngFunc_WriteCoord, origen[0]) // eje x
engfunc(EngFunc_WriteCoord, origen[1]) // eje y
engfunc(EngFunc_WriteCoord, origen[2]+555.0) // eje z
write_short(g_exploSpr) // sprite
write_byte(0) // marco inicial
write_byte(0) // framerate
write_byte(4) // vida
write_byte(60) // ancho
write_byte(0) // ruido
write_byte(255) // rojo
write_byte (200) // verde
write_byte(0) // azul
write_byte(200) // brillo
write_byte(0) // velocidad
message_end()
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, cantidad = 16)
{
static Float:color[3]
color[0] = float(r)
color[1] = float(g)
color[2] = float(b)
set_pev(entity, pev_renderfx , fx)
set_pev(entidad, pev_rendercolor, color)
set_pev(entidad, pev_rendermode, render)
set_pev(entidad, pev_renderamt, float(cantidad))
}