Post by Yarder on Jan 1, 2019 7:23:35 GMT
This is my 1st tutorial in ZPPV, hope you like it!
add libraries :
then defines :
search :
it looks like this :
replace it like this :
then search :
it has this code :
replace with :
after that find :
it has this code :
replace it with :
search of :
it has this code :
replace it with :
then search of :
it looks like this :
replace it with this one :
then search :
it will look like this :
replace with :
search :
it look like this :
replace with :
search for :
and delete it attchment :
then delete these cvars :
finaly search for :
it has ths code :
replace it with :
Save the sma file then comile and enjoy
here the orginal tutireal but it has many bugs to fix : forums.alliedmods.net/showthread.php?t=275813
+k if that help!
add libraries :
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <engine>
#include <hamsandwich>
#include <xs>
then defines :
#define HE_RANGE(%1,%2) entity_range(%1,%2)
#define HE_MODEL_EXPLODE "sprites/zerogxplode.spr"
#define HE_SOUND_EXPLODE "fvox/flatline.wav"
search :
// grenade sprites
it looks like this :
new g_trailSpr, g_exploSpr, g_flameSpr, g_smokeSpr, g_glassSpr // grenade sprites
replace it like this :
new g_trailSpr, g_exploSpr, g_flameSpr, g_smokeSpr, g_glassSpr, g_hExplode // grenade sprites
then search :
// Custom sprites for grenades
it has this code :
// Custom sprites for grenades
g_trailSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_trail)
g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
g_flameSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_fire)
g_smokeSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_smoke)
g_glassSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_glass)
replace with :
// Custom sprites for grenades
g_trailSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_trail)
g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
g_flameSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_fire)
g_smokeSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_smoke)
g_glassSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_glass)
g_hExplode = engfunc( EngFunc_PrecacheModel, HE_MODEL_EXPLODE);
engfunc(EngFunc_PrecacheSound, HE_SOUND_EXPLODE);
after that find :
// HACK: pev_ field used to store custom nade types and their values
it has this code :
// HACK: pev_ field used to store custom nade types and their values
const PEV_NADE_TYPE = pev_flTimeStepSound
const NADE_TYPE_INFECTION = 1111
const NADE_TYPE_NAPALM = 2222
const NADE_TYPE_FROST = 3333
const NADE_TYPE_FLARE = 4444
const PEV_FLARE_COLOR = pev_punchangle
const PEV_FLARE_DURATION = pev_flSwimTime
replace it with :
// HACK: pev_ field used to store custom nade types and their values
const PEV_NADE_TYPE = pev_flTimeStepSound
const NADE_TYPE_INFECTION = 1111
const NADE_TYPE_EXPLODE = 2222
const NADE_TYPE_NAPALM = 3333
const NADE_TYPE_FROST = 4444
search of :
// Check if it's one of our custom nades
it has this code :
// Check if it's one of our custom nades
switch (pev(entity, PEV_NADE_TYPE))
{
case NADE_TYPE_INFECTION: // Infection Bomb
{
infection_explode(entity)
return HAM_SUPERCEDE;
}
case NADE_TYPE_NAPALM: // Napalm Grenade
{
fire_explode(entity)
return HAM_SUPERCEDE;
}
case NADE_TYPE_FROST: // Frost Grenade
{
frost_explode(entity)
return HAM_SUPERCEDE;
}
case NADE_TYPE_FLARE: // Flare
{
// Get its duration
static duration
duration = pev(entity, PEV_FLARE_DURATION)
// Already went off, do lighting loop for the duration of PEV_FLARE_DURATION
if (duration > 0)
{
// Check whether this is the last loop
if (duration == 1)
{
// Get rid of the flare entity
engfunc(EngFunc_RemoveEntity, entity)
return HAM_SUPERCEDE;
}
// Light it up!
flare_lighting(entity, duration)
// Set time for next loop
set_pev(entity, PEV_FLARE_DURATION, --duration)
set_pev(entity, pev_dmgtime, current_time + 2.0)
}
// Light up when it's stopped on ground
else if ((pev(entity, pev_flags) & FL_ONGROUND) && fm_get_speed(entity) < 10)
{
// Flare sound
static sound[64]
ArrayGetString(grenade_flare, random_num(0, ArraySize(grenade_flare) - 1), sound, charsmax(sound))
emit_sound(entity, CHAN_WEAPON, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
// Set duration and start lightning loop on next think
set_pev(entity, PEV_FLARE_DURATION, 1 + get_pcvar_num(cvar_flareduration)/2)
set_pev(entity, pev_dmgtime, current_time + 0.1)
}
else
{
// Delay explosion until we hit ground
set_pev(entity, pev_dmgtime, current_time + 0.5)
}
}
}
replace it with :
// Check if it's one of our custom nades
switch (pev(entity, PEV_NADE_TYPE))
{
case NADE_TYPE_INFECTION: // Infection Bomb
{
infection_explode(entity)
return HAM_SUPERCEDE;
}
case NADE_TYPE_EXPLODE: // HE Grenade
{
he_explode(entity)
return HAM_SUPERCEDE;
}
case NADE_TYPE_NAPALM: // Napalm Grenade
{
fire_explode(entity)
return HAM_SUPERCEDE;
}
case NADE_TYPE_FROST: // Frost Grenade
{
frost_explode(entity)
return HAM_SUPERCEDE;
}
}
then search of :
// Fire Grenade Explosion
it looks like this :
// Fire Grenade Explosion
fire_explode(ent)
{
// Get origin
static Float:originF[3]
pev(ent, pev_origin, originF)
// Make the explosion
create_blast2(originF)
// Fire nade explode sound
static sound[64]
ArrayGetString(grenade_fire, random_num(0, ArraySize(grenade_fire) - 1), sound, charsmax(sound))
emit_sound(ent, CHAN_WEAPON, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
// Collisions
static victim
victim = -1
while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, NADE_EXPLOSION_RADIUS)) != 0)
{
// Only effect alive zombies
if (!is_user_valid_alive(victim) || !g_zombie[victim] || g_nodamage[victim])
continue;
// Heat icon?
if (get_pcvar_num(cvar_hudicons))
{
message_begin(MSG_ONE_UNRELIABLE, g_msgDamage, _, victim)
write_byte(0) // damage save
write_byte(0) // damage take
write_long(DMG_BURN) // damage type
write_coord(0) // x
write_coord(0) // y
write_coord(0) // z
message_end()
}
if (g_nemesis[victim] || g_assassin[victim]) // fire duration (nemesis and assassin is fire resistant)
g_burning_duration[victim] += get_pcvar_num(cvar_fireduration)
else
g_burning_duration[victim] += get_pcvar_num(cvar_fireduration) * 5
// Set burning task on victim if not present
if (!task_exists(victim+TASK_BURN))
set_task(0.2, "burning_flame", victim+TASK_BURN, _, _, "b")
}
// Get rid of the grenade
engfunc(EngFunc_RemoveEntity, ent)
}
replace it with this one :
// HE Grenade Explosion
he_explode(ent)
{
static Float: originF[3]
pev(ent, pev_origin, originF);
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_EXPLOSION);
engfunc(EngFunc_WriteCoord, originF[0]);
engfunc(EngFunc_WriteCoord, originF[1]);
engfunc(EngFunc_WriteCoord, originF[2]);
write_short(g_hExplode);
write_byte(30); //marime
write_byte(15); //viteza
write_byte(0);
message_end();
static attacker
attacker = pev(ent, pev_owner)
for (new victim = 1; victim < 33; victim++)
{
if (!is_user_connected( victim ) || !is_user_alive( victim ))
continue;
if (g_zombie[victim])
{
static Float: fDistance, Float: fDamage;
fDistance = HE_RANGE(victim, ent);
if (fDistance < 300.0)
{
fDamage = 667.0 - fDistance;
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), _, victim);
write_short(2048);
write_short(1024);
write_short(FFADE_IN);
write_byte(220);
write_byte(0);
write_byte(0);
write_byte(fDistance < 220 ? 220 : 205);
message_end();
client_cmd (victim, "spk ^"%s^"", HE_SOUND_EXPLODE);
message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, victim);
write_short(4096 * 100); // amplitude
write_short(4096 * 500); // duration
write_short(4096 * 200); // frequency
message_end();
if (float(get_user_health(victim)) - fDamage > 0.0)
{
ExecuteHamB(Ham_TakeDamage, victim, ent, attacker, fDamage, DMG_BLAST);
}
else
{
ExecuteHamB(Ham_Killed, victim, attacker, 4);
}
if (!g_nemesis[victim] && !g_assassin[victim])
fDamage *= 0.75;
static name[32]; get_user_name(victim, name, charsmax(name))
zp_colored_print(attacker, "^4[ZP]^1 Damage to^4 %s^1 ::^4 %0.0f^1 damage", name, fDamage)
if (fDamage >= get_pcvar_num(cvar_ammodamage_human))
g_ammopacks[attacker] += 2
else
g_ammopacks[attacker] += 1
}
}
}
engfunc(EngFunc_RemoveEntity, ent)
}
// Fire Grenade Explosion
fire_explode(ent)
{
// Get origin
static Float:originF[3]
pev(ent, pev_origin, originF)
// Make the explosion
create_blast2(originF)
// Fire nade explode sound
static sound[64]
ArrayGetString(grenade_fire, random_num(0, ArraySize(grenade_fire) - 1), sound, charsmax(sound))
emit_sound(ent, CHAN_WEAPON, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
// Collisions
static victim
victim = -1
while ((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, NADE_EXPLOSION_RADIUS)) != 0)
{
// Only effect alive zombies
if (!is_user_valid_alive(victim) || !g_zombie[victim] || g_nodamage[victim])
continue;
// Heat icon?
if (get_pcvar_num(cvar_hudicons))
{
message_begin(MSG_ONE_UNRELIABLE, g_msgDamage, _, victim)
write_byte(0) // damage save
write_byte(0) // damage take
write_long(DMG_BURN) // damage type
write_coord(0) // x
write_coord(0) // y
write_coord(0) // z
message_end()
}
if (g_nemesis[victim] || g_assassin[victim]) // fire duration (nemesis/assassin is fire resistant)
g_burning_duration[victim] += get_pcvar_num(cvar_fireduration)
else
g_burning_duration[victim] += get_pcvar_num(cvar_fireduration) * 5
// Set burning task on victim if not present
if (!task_exists(victim+TASK_BURN))
set_task(0.2, "burning_flame", victim+TASK_BURN, _, _, "b")
}
// Get rid of the grenade
engfunc(EngFunc_RemoveEntity, ent)
}
then search :
// Forward Set Model
it will look like this :
// Forward Set Model
public fw_SetModel(entity, const model[])
{
// We don't care
if (strlen(model) < 8)
return;
// Remove weapons?
if (get_pcvar_float(cvar_removedropped) > 0.0)
{
// Get entity's classname
static classname[10]
pev(entity, pev_classname, classname, charsmax(classname))
// Check if it's a weapon box
if (equal(classname, "weaponbox"))
{
// They get automatically removed when thinking
set_pev(entity, pev_nextthink, get_gametime() + get_pcvar_float(cvar_removedropped))
return;
}
}
// Narrow down our matches a bit
if (model[7] != 'w' || model[8] != '_')
return;
// Get damage time of grenade
static Float:dmgtime
pev(entity, pev_dmgtime, dmgtime)
// Grenade not yet thrown
if (dmgtime == 0.0)
return;
// Get whether grenade's owner is a zombie
if (g_zombie[pev(entity, pev_owner)])
{
if (model[9] == 'h' && model[10] == 'e' && get_pcvar_num(cvar_extrainfbomb)) // Infection Bomb
{
// Give it a glow
fm_set_rendering(entity, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 16);
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(0) // r
write_byte(200) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_INFECTION)
}
}
else if (model[9] == 'h' && model[10] == 'e' && get_pcvar_num(cvar_firegrenades)) // Napalm Grenade
{
// Give it a glow
fm_set_rendering(entity, kRenderFxGlowShell, 200, 0, 0, kRenderNormal, 16);
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(200) // r
write_byte(0) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_NAPALM)
}
else if (model[9] == 'f' && model[10] == 'l' && get_pcvar_num(cvar_frostgrenades)) // Frost Grenade
{
// Give it a glow
fm_set_rendering(entity, kRenderFxGlowShell, 0, 100, 200, kRenderNormal, 16);
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(0) // r
write_byte(100) // g
write_byte(200) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_FROST)
}
else if (model[9] == 's' && model[10] == 'm' && get_pcvar_num(cvar_flaregrenades)) // Flare
{
// Build flare's color
static rgb[3]
switch (get_pcvar_num(cvar_flarecolor))
{
case 0: // white
{
rgb[0] = 255 // r
rgb[1] = 255 // g
rgb[2] = 255 // b
}
case 1: // red
{
rgb[0] = random_num(50,255) // r
rgb[1] = 0 // g
rgb[2] = 0 // b
}
case 2: // green
{
rgb[0] = 0 // r
rgb[1] = random_num(50,255) // g
rgb[2] = 0 // b
}
case 3: // blue
{
rgb[0] = 0 // r
rgb[1] = 0 // g
rgb[2] = random_num(50,255) // b
}
case 4: // random (all colors)
{
rgb[0] = random_num(50,200) // r
rgb[1] = random_num(50,200) // g
rgb[2] = random_num(50,200) // b
}
case 5: // random (r,g,b)
{
switch (random_num(1, 3))
{
case 1: // red
{
rgb[0] = random_num(50,255) // r
rgb[1] = 0 // g
rgb[2] = 0 // b
}
case 2: // green
{
rgb[0] = 0 // r
rgb[1] = random_num(50,255) // g
rgb[2] = 0 // b
}
case 3: // blue
{
rgb[0] = 0 // r
rgb[1] = 0 // g
rgb[2] = random_num(50,255) // b
}
}
}
}
// Give it a glow
fm_set_rendering(entity, kRenderFxGlowShell, rgb[0], rgb[1], rgb[2], kRenderNormal, 16);
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(rgb[0]) // r
write_byte(rgb[1]) // g
write_byte(rgb[2]) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_FLARE)
// Set flare color on the thrown grenade entity
set_pev(entity, PEV_FLARE_COLOR, rgb)
}
}
replace with :
// Forward Set Model
public fw_SetModel(entity, const model[])
{
// We don't care
if (strlen(model) < 8)
return;
// Remove weapons?
if (get_pcvar_float(cvar_removedropped) > 0.0)
{
// Get entity's classname
static classname[10]
pev(entity, pev_classname, classname, charsmax(classname))
// Check if it's a weapon box
if (equal(classname, "weaponbox"))
{
// They get automatically removed when thinking
set_pev(entity, pev_nextthink, get_gametime() + get_pcvar_float(cvar_removedropped))
return;
}
}
// Narrow down our matches a bit
if (model[7] != 'w' || model[8] != '_')
return;
// Get damage time of grenade
static Float:dmgtime
pev(entity, pev_dmgtime, dmgtime)
// Grenade not yet thrown
if (dmgtime == 0.0)
return;
// Get whether grenade's owner is a zombie
if (g_zombie[pev(entity, pev_owner)])
{
if (model[9] == 'h' && model[10] == 'e' && get_pcvar_num(cvar_extrainfbomb)) // Infection Bomb
{
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(0) // r
write_byte(250) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_INFECTION)
}
}
else if (model[9] == 'h' && model[10] == 'e' && get_pcvar_num(cvar_flaregrenades)) // HE Grenade
{
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(200) // r
write_byte(0) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_EXPLODE)
}
else if (model[9] == 'f' && model[10] == 'l' && get_pcvar_num(cvar_firegrenades)) // Napalm Grenade
{
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(250) // r
write_byte(100) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_NAPALM)
}
else if (model[9] == 's' && model[10] == 'm' && get_pcvar_num(cvar_frostgrenades)) // Frost Grenade
{
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(0) // r
write_byte(100) // g
write_byte(200) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_FROST)
}
}
search :
// Infection Bomb: Green Blast
it look like this :
// Infection Bomb: Green Blast
create_blast(const Float:originF[3])
{
// Smallest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+385.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(200) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(200) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Largest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+555.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(200) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
// Fire Grenade: Fire Blast
create_blast2(const Float:originF[3])
{
// Smallest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+385.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(100) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(50) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Largest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+555.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(0) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
// Frost Grenade: Freeze Blast
create_blast3(const Float:originF[3])
{
// Smallest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+385.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(100) // green
write_byte(200) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(100) // green
write_byte(200) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Largest ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+555.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(100) // green
write_byte(200) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
replace with :
// Infection Bomb: Green Blast
create_blast(const Float:originF[3])
{
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(250) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
// Fire Grenade: Fire Blast
create_blast2(const Float:originF[3])
{
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(200) // red
write_byte(50) // green
write_byte(0) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
// Frost Grenade: Freeze Blast
create_blast3(const Float:originF[3])
{
// Medium ring
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
engfunc(EngFunc_WriteCoord, originF[0]) // x axis
engfunc(EngFunc_WriteCoord, originF[1]) // y axis
engfunc(EngFunc_WriteCoord, originF[2]+470.0) // z axis
write_short(g_exploSpr) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(4) // life
write_byte(60) // width
write_byte(0) // noise
write_byte(0) // red
write_byte(100) // green
write_byte(200) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
}
search for :
// Flare Lighting Effects
and delete it attchment :
// Flare Lighting Effects
flare_lighting(entity, duration)
{
// Get origin and color
static Float:originF[3], color[3]
pev(entity, pev_origin, originF)
pev(entity, PEV_FLARE_COLOR, color)
// Lighting
engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_DLIGHT) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
write_byte(get_pcvar_num(cvar_flaresize)) // radius
write_byte(color[0]) // r
write_byte(color[1]) // g
write_byte(color[2]) // b
write_byte(21) //life
write_byte((duration < 2) ? 3 : 0) //decay rate
message_end()
// Sparks
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPARKS) // TE id
engfunc(EngFunc_WriteCoord, originF[0]) // x
engfunc(EngFunc_WriteCoord, originF[1]) // y
engfunc(EngFunc_WriteCoord, originF[2]) // z
message_end()
}
then delete these cvars :
cvar_flarecolor
cvar_flareduration
cvar_flaresize
cvar_flaresize2
finaly search for :
// CVARS - Custom Grenades
it has ths code :
// CVARS - Custom Grenades
cvar_firegrenades = register_cvar("zp_fire_grenades", "1")
cvar_fireduration = register_cvar("zp_fire_duration", "10")
cvar_firedamage = register_cvar("zp_fire_damage", "5")
cvar_fireslowdown = register_cvar("zp_fire_slowdown", "0.5")
cvar_frostgrenades = register_cvar("zp_frost_grenades", "1")
cvar_freezeduration = register_cvar("zp_frost_duration", "3")
cvar_flaregrenades = register_cvar("zp_flare_grenades","1")
cvar_flareduration = register_cvar("zp_flare_duration", "60")
cvar_flaresize = register_cvar("zp_flare_size", "25")
cvar_flarecolor = register_cvar("zp_flare_color", "0")
replace it with :
// CVARS - Custom Grenades
cvar_firegrenades = register_cvar("zp_fire_grenades", "1")
cvar_fireduration = register_cvar("zp_fire_duration", "10")
cvar_firedamage = register_cvar("zp_fire_damage", "5")
cvar_fireslowdown = register_cvar("zp_fire_slowdown", "0.5")
cvar_frostgrenades = register_cvar("zp_frost_grenades", "1")
cvar_freezeduration = register_cvar("zp_frost_duration", "3")
cvar_flaregrenades = register_cvar("zp_flare_grenades","1")
Save the sma file then comile and enjoy
here the orginal tutireal but it has many bugs to fix : forums.alliedmods.net/showthread.php?t=275813
+k if that help!