|
Senior Member
Join Date: Sep 2010
Location: Romania, Constanta
|

12-27-2012
, 04:14
Re: need plugin , grenade effect
|
#6
|
Go to ur main source code and search for
Code:
cvar_frostdamage, Float:cvar_gravity
Add ur new variables now
PHP Code:
cvar_frostdamage, Float:cvar_gravity, frostgib, firegib, infectgib, g_explosfr, g_explofre
You need to precache them afterwards
Search for:
Add after this comment
PHP Code:
// Nade Effects frostgib = precache_model("sprites/frostgib.spr") firegib = precache_model("sprites/firegib.spr") infectgib = precache_model("sprites/infectgib.spr") g_explosfr = precache_model("sprites/frost_exp.spr") g_explofre = precache_model("sprites/fireexplo.spr")
Create blast time
Search for:
Code:
// Frost Grenade: Freeze Blast
and replace all public like this
PHP Code:
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(191) // green write_byte(255) // 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(191) // green write_byte(255) // blue write_byte(200) // brightness write_byte(0) // speed message_end() // Luz Dinamica engfunc(EngFunc_MessageBegin, MSG_PVS, 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(50) // radio write_byte(0) // red write_byte(191) // green write_byte(255) // blue write_byte(30) // vida en 0.1, 30 = 3 segundos write_byte(30) // velocidad de decaimiento message_end()
engfunc(EngFunc_MessageBegin, MSG_BROADCAST,SVC_TEMPENTITY, originF, 0) write_byte(TE_EXPLOSION) engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2]+75) // z axis write_short(g_explosfr) write_byte(17) write_byte(15) write_byte(TE_EXPLFLAG_NOSOUND) message_end(); engfunc(EngFunc_MessageBegin, MSG_BROADCAST,SVC_TEMPENTITY, originF, 0) write_byte(TE_SPRITETRAIL) // TE ID engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2] + 40) // z axis engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2]) // z axis write_short(frostgib) // Sprite Index write_byte(30) // Count write_byte(10) // Life write_byte(2) // Scale write_byte(50) // Velocity Along Vector write_byte(10) // Rendomness of Velocity message_end(); }
For fire and infection blast effect:
PHP Code:
// 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(50) // 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(250) // green write_byte(50) // blue write_byte(200) // brightness write_byte(0) // speed message_end() // Luz Dinamica engfunc(EngFunc_MessageBegin, MSG_PVS, 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(50) // radio write_byte(0) // red write_byte(150) // green write_byte(0) // blue write_byte(30) // vida en 0.1, 30 = 3 segundos write_byte(30) // velocidad de decaimiento message_end() engfunc(EngFunc_MessageBegin, MSG_BROADCAST,SVC_TEMPENTITY, originF, 0) write_byte(TE_SPRITETRAIL) // TE ID engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2] + 40) // z axis engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2]) // z axis write_short(infectgib) // Sprite Index write_byte(30) // Count write_byte(10) // Life write_byte(2) // Scale write_byte(50) // Velocity Along Vector write_byte(10) // Rendomness of Velocity 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(255) // red write_byte(127) // green write_byte(80) // 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(255) // red write_byte(127) // green write_byte(80) // blue write_byte(200) // brightness write_byte(0) // speed message_end() // Luz Dinamica engfunc(EngFunc_MessageBegin, MSG_PVS, 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(50) // radio write_byte(255) // red write_byte(127) // green write_byte(80) // blue write_byte(30) // vida en 0.1, 30 = 3 segundos write_byte(30) // velocidad de decaimiento message_end()
engfunc(EngFunc_MessageBegin, MSG_BROADCAST,SVC_TEMPENTITY, originF, 0) write_byte(TE_EXPLOSION) engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2]+75) // z axis write_short(g_explofre) write_byte(17) write_byte(15) write_byte(TE_EXPLFLAG_NOSOUND) message_end(); engfunc(EngFunc_MessageBegin, MSG_BROADCAST,SVC_TEMPENTITY, originF, 0) write_byte(TE_SPRITETRAIL) // TE ID engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2] + 40) // z axis engfunc(EngFunc_WriteCoord, originF[0]) // x axis engfunc(EngFunc_WriteCoord, originF[1]) // y axis engfunc(EngFunc_WriteCoord, originF[2]) // z axis write_short(firegib) // Sprite Index write_byte(30) // Count write_byte(10) // Life write_byte(2) // Scale write_byte(50) // Velocity Along Vector write_byte(10) // Rendomness of Velocity message_end(); }
And add sprite effects for explo and spritetrail
Thanks goes to Daredevil for his release
And that's all im going to try WoW C++ scripts
GL & HF All
Thank you for ur support
Last edited by Sprit3x; 12-27-2012 at 05:19.
|
|