Author
|
Message
|
Junior Member
|
06-26-2021
, 01:38
Zombie class immune to frost nades.
|
#1
|
Hi there. How should i write a zombie class that shatters the ice like nemesis does?
This is the nemesis code. But how could i adapt it for a zombie class? I am using 4.3.
Quote:
// Nemesis shouldn't be frozen
if (g_nemesis[victim])
{
// Get player's origin
static origin2[3]
get_user_origin(victim, origin2)
// Broken glass sound
ArrayGetString(grenade_frost_break, random_num(0, ArraySize(grenade_frost_break) - 1), sound, charsmax(sound))
emit_sound(victim, CHAN_BODY, sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
// Glass shatter
message_begin(MSG_PVS, SVC_TEMPENTITY, origin2)
write_byte(TE_BREAKMODEL) // TE id
write_coord(origin2[0]) // x
write_coord(origin2[1]) // y
write_coord(origin2[2]+24) // z
write_coord(16) // size x
write_coord(16) // size y
write_coord(16) // size z
write_coord(random_num(-50, 50)) // velocity x
write_coord(random_num(-50, 50)) // velocity y
write_coord(25) // velocity z
write_byte(10) // random velocity
write_short(g_glassSpr) // model
write_byte(10) // count
write_byte(25) // life
write_byte(BREAK_GLASS) // flags
message_end()
continue;
}
|
|
|
|
|