Raised This Month: $ Target: $400
 0% 

Help weapon shoot sprites


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
d5nd5n
New Member
Join Date: May 2017
Old 05-29-2017 , 04:07   Help weapon shoot sprites
Reply With Quote #1

Hello i need help to weapon shoot sprite

Example : https://www.youtube.com/watch?v=x9xMkrHBNbU

im testing and no get shoot sprite

Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

new m_spriteTexture

public plugin_init() 
{
    RegisterHam(Ham_TraceAttack, "worldspawn", "make_tracer", 1)
}

public plugin_precache()
{
    m_spriteTexture = engfunc(EngFunc_PrecacheModel, "sprites/mysprite.spr")
}

public make_tracer(victim, attacker, Float:damage, Float:direction[3], tracehandle, damage_type)
{
    new color_rojo = 255
    new color_verde = 0
    new color_azul = 255
    
    
    if(get_user_weapon(attacker) == CSW_AK47) 
    {
        new Float:vecEndPos[3] 
        get_tr2(tracehandle, TR_vecEndPos, vecEndPos) 
        
        engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, vecEndPos, 0) 
        write_byte(TE_BEAMENTPOINT) 
        write_short(attacker | 0x1000) 
        engfunc(EngFunc_WriteCoord, vecEndPos[0]) // x 
        engfunc(EngFunc_WriteCoord, vecEndPos[1]) // x 
        engfunc(EngFunc_WriteCoord, vecEndPos[2]) // x 
        write_short(m_spriteTexture) ( NO SHOOT SPRITE WHAT REASON HELP XDD
        write_byte(0) // framerate 
        write_byte(0) // framerate 
        write_byte(1) // framerate 
        write_byte(10) // framerate 
        write_byte(0) // framerate 
        write_byte(color_rojo)
        write_byte(color_verde)
        write_byte(color_azul)
        write_byte(128) // brightness 
        write_byte(0) // brightness 
        message_end() 
    }
    return HAM_HANDLED
}
d5nd5n is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode