View Single Post
Plugin Info:     Modification:          Category:         
TiEsTo GnS
Junior Member
Join Date: Aug 2018
Old 10-09-2018 , 16:24   HEADSHOT! = weed sprites! ;)
#1

---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 FloatriginF[3]
pev(xVictim, pev_origin, originF)

xEffectDrugs(originF, 27, 50, 50, 1, 30, 50)
}
}

xEffectDrugs(const FloatriginF[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 ;)
Blocked Attachments
File Type: zip HsGnSWeed.ZIP

Last edited by TiEsTo GnS; 10-09-2018 at 16:49. Reason: update
TiEsTo GnS is offline