---HEADSHOT=WEED SPRITES!---
hello i thing some players find this plugin or simillar
when u kill from headshot,appear weed sprites!
just compile it!
---------------------------------------------------------------
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "GnS-headshot-Weed"
#define VERSION "1.1"
#define AUTHOR "GnS"
new xSprHs[3]
static sprites_maconhas[][] =
{
"sprites/HsGnSWeed/r.spr",
"sprites/HsGnSWeed/y.spr",
"sprites/HsGnSWeed/g.spr"
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "xDeathMsg", "a")
}
public plugin_precache()
{
for(new i = 0; i < sizeof(sprites_maconhas); i++)
{
xSprHs[i] = precache_model(sprites_maconhas[i])
}
}
public xDeathMsg()
{
new xHs = read_data(3)
if(xHs)
{
new xVictim = read_data(2)
static Float
riginF[3]
pev(xVictim, pev_origin, originF)
xEffectDrugs(originF, 27, 50, 50, 1, 30, 50)
}
}
xEffectDrugs(const Float
riginF[3], head, sprites, life, scale, velo, decals)
{
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPRITETRAIL)
engfunc(EngFunc_WriteCoord, originF[0]) // X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2]+head) // Z
engfunc(EngFunc_WriteCoord, originF[0]) // X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2]+head) // Z
write_short(xSprHs[0])
write_byte(sprites) // How sprites want to show up..
write_byte(life) // life
write_byte(scale) // scale
write_byte(velo) // velo
write_byte(decals) // decals
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPRITETRAIL)
engfunc(EngFunc_WriteCoord, originF[0]) // X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2]+head) // Z
engfunc(EngFunc_WriteCoord, originF[0]) // X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2]+head) // Z
write_short(xSprHs[1])
write_byte(sprites) // How sprites want to show up...
write_byte(life) // life
write_byte(scale) // scale
write_byte(velo) // velo
write_byte(decals) // decals
message_end()
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_SPRITETRAIL)
engfunc(EngFunc_WriteCoord, originF[0]) // X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2]+head) // Z
engfunc(EngFunc_WriteCoord, originF[0]) // X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2]+head) // Z
write_short(xSprHs[2])
write_byte(sprites) // How sprites want to show up...
write_byte(life) // life
write_byte(scale) // scale
write_byte(velo) // velo
write_byte(decals) // decals
message_end()
}
---welcome ;)