How to add effect to Infection bomb (ZPA+ZP4.3+ZPNEWMODES)
Mar 3, 2016 19:12:52 GMT
zmd94 and ErronBlack like this
Post by newandclueless on Mar 3, 2016 19:12:52 GMT
First of all, big credit to Abhinash for the original link.
and thanks to .:Legend@FWarior:. for his other guides.
this guide is taken from another website and translated to english
original post: zombie-mod.ru/counter-strike/zombie-plague/server_addons/13091-zp-delaem-sprite-oskolkov-dlya-granaty-infection.html
this is what you need to do:
[1] Go to Main ZP Source File (zombie_plague40.sma), press ctrl +f and Find
Then add this after cs sounds:
so it looks like this now:
[2] then look for these lines
and add this at the bottom again:
so now you have this:
[3] Now, find this code:
then go down a few lines and you will see this:
now copy/paste this code after it:
so it looks like this now:
[4] last step is to download the sprite and place it in sprites folder so: "cstrike/sprites/Infection.spr"
and thanks to .:Legend@FWarior:. for his other guides.
this guide is taken from another website and translated to english
original post: zombie-mod.ru/counter-strike/zombie-plague/server_addons/13091-zp-delaem-sprite-oskolkov-dlya-granaty-infection.html
this is what you need to do:
[1] Go to Main ZP Source File (zombie_plague40.sma), press ctrl +f and Find
// CS sounds
new const sound_flashlight[] = "items/flashlight1.wav"
new const sound_buyammo[] = "items/9mmclip1.wav"
new const sound_armorhit[] = "player/bhit_helmet-1.wav"
Then add this after cs sounds:
new g_infect_gibs
so it looks like this now:
new const sound_flashlight[] = "items/flashlight1.wav"
new const sound_buyammo[] = "items/9mmclip1.wav"
new const sound_armorhit[] = "player/bhit_helmet-1.wav"
new g_infect_gibs
[2] then look for these lines
// Custom sprites for grenades
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)
and add this at the bottom again:
g_infect_gibs = precache_model("sprites/Infection.spr")
so now you have this:
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_infect_gibs = precache_model("sprites/Infection.spr")
[3] Now, find this code:
// Infection Bomb Explosion
infection_explode(ent)
{
then go down a few lines and you will see this:
// Make the explosion
create_blast3(originF)
now copy/paste this code after it:
// Added Infection bomb sprite
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( TE_SPRITETRAIL ) // Throws a shower of sprites or models
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // start pos
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 200.0)
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // velocity
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 30.0)
write_short(g_infect_gibs) // spr
write_byte(60) // (count)
write_byte(random_num(27,30)) // (life in 0.1's)
write_byte(2) // byte (scale in 0.1's)
write_byte(50) // (velocity along vector in 10's)
write_byte(10) // (randomness of velocity in 10's)
message_end()
so it looks like this now:
// Make the explosion
create_blast3(originF)
// Added Infection bomb sprite effects
message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( TE_SPRITETRAIL ) // Throws a shower of sprites or models
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // start pos
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 200.0)
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // velocity
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 30.0)
write_short(g_infect_gibs) // spr
write_byte(60) // (count)
write_byte(random_num(27,30)) // (life in 0.1's)
write_byte(2) // byte (scale in 0.1's)
write_byte(50) // (velocity along vector in 10's)
write_byte(10) // (randomness of velocity in 10's)
message_end()
[4] last step is to download the sprite and place it in sprites folder so: "cstrike/sprites/Infection.spr"