Raised This Month: $ Target: $400
 0% 

Bullet Trail ?


Post New Thread Reply   
 
Thread Tools Display Modes
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-08-2017 , 01:14   Re: Bullet Trail ?
Reply With Quote #11

is this correct :

PHP Code:
public plugin_init()
{
RegisterHam(Ham_TraceAttack"worldspawn""TraceAttack"1)

PHP Code:
public TraceAttack(iEntiAttackerFloat:flDamageFloat:fDir[3], ptriDamageType)
{
    new 
iWeapon get_user_weapon(iAttacker)
    if( 
iWeapon == CSW_AWP // here
    
{
        return
    }
    {
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_TRACER)
    
write_coord(iOrigin[0])
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
write_coord_f(flEnd[0]) 
    
write_coord_f(flEnd[1]) 
    
write_coord_f(flEnd[2]) 
    
write_byte(255)
    
write_byte(0)
    
write_byte(0)
    
message_end()
    }


Last edited by yas17sin; 02-08-2017 at 01:16.
yas17sin is offline
Send a message via ICQ to yas17sin
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-08-2017 , 01:16   Re: Bullet Trail ?
Reply With Quote #12

Yes, but why did you add '{'?

PHP Code:
public TraceAttack(iEntiAttackerFloat:flDamageFloat:fDir[3], ptriDamageType)
{
    new 
iWeapon get_user_weapon(iAttacker)
    if( 
iWeapon == CSW_AWP // here
    
{
        return
    }
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_TRACER)
    
write_coord(iOrigin[0])
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
write_coord_f(flEnd[0]) 
    
write_coord_f(flEnd[1]) 
    
write_coord_f(flEnd[2]) 
    
write_byte(255)
    
write_byte(0)
    
write_byte(0)
    
message_end()


Edit:

And if you want to check if the player is VIP or something like this, add a check similar at this:

PHP Code:
if(isMeVip[iAttacker]) 
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 02-08-2017 at 01:21.
EFFx is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-08-2017 , 01:25   Re: Bullet Trail ?
Reply With Quote #13

sorry, and does i need this ( iOrigin, flEnd ) or just delete this cause i need to store them in new variable. and also where this is used ( write_coord_f ) :
PHP Code:
write_coord(iOrigin[0])
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
write_coord_f(flEnd[0]) 
    
write_coord_f(flEnd[1]) 
    
write_coord_f(flEnd[2]) 
yas17sin is offline
Send a message via ICQ to yas17sin
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-08-2017 , 01:34   Re: Bullet Trail ?
Reply With Quote #14

you should continue with this because that's what show the tracers.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Old 02-08-2017, 01:41
yas17sin
This message has been deleted by yas17sin. Reason: nvm
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-08-2017 , 01:51   Re: Bullet Trail ?
Reply With Quote #15

OMG it's not working but i think all are good. So why it's not working.:/

here all the things i use in the code :

PHP Code:
#define write_coord_f(%1)    engfunc(EngFunc_WriteCoord,%1)

public plugin_init()
{
    
RegisterHam(Ham_TraceAttack"worldspawn""TraceAttack"1)
}
public 
TraceAttack(iEntiAttackerFloat:flDamageFloat:fDir[3], ptriDamageType)
{
    new 
iWeapon get_user_weapon(iAttacker)
    if( 
iWeapon == CSW_AWP // here
    
{
        return
    }
    new 
iOrigin[3], Float:flEnd[3]

    
get_user_origin(iAttackeriOrigin1)
    
get_tr2(ptrTR_vecEndPosflEnd)
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_TRACER)
    
write_coord(iOrigin[0])
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
write_coord_f(flEnd[0]) 
    
write_coord_f(flEnd[1]) 
    
write_coord_f(flEnd[2]) 
    
write_byte(255)
    
write_byte(0)
    
write_byte(0)
    
message_end()


Last edited by yas17sin; 02-08-2017 at 01:52.
yas17sin is offline
Send a message via ICQ to yas17sin
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-08-2017 , 03:00   Re: Bullet Trail ?
Reply With Quote #16

Change this

PHP Code:
    new iWeapon get_user_weapon(iAttacker)
    if( 
iWeapon == CSW_AWP // here
    
{
        return
    } 
To this

PHP Code:
    new iWeapon get_user_weapon(iAttacker)
    if( 
iWeapon != CSW_AWP // here
    
{
        return
    } 
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-08-2017 , 14:48   Re: Bullet Trail ?
Reply With Quote #17

now when i join the game and i try to shoot with the gun it kick me and give me this error in console :
Code:
Host_Error: UserMsg: Not Present on Client 25

Last edited by yas17sin; 02-08-2017 at 14:49.
yas17sin is offline
Send a message via ICQ to yas17sin
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 02-08-2017 , 15:34   Re: Bullet Trail ?
Reply With Quote #18

Quote:
Originally Posted by yas17sin View Post
now when i join the game and i try to shoot with the gun it kick me and give me this error in console :
Code:
Host_Error: UserMsg: Not Present on Client 25
i`ve seen this error many times on non-steam servers only
tarsisd2 is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 02-08-2017 , 15:43   Re: Bullet Trail ?
Reply With Quote #19

so you mean i have no steam server -_-

EDIT : then here you go proff : http://prntscr.com/e69e50

Last edited by yas17sin; 02-08-2017 at 16:08.
yas17sin is offline
Send a message via ICQ to yas17sin
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-08-2017 , 16:41   Re: Bullet Trail ?
Reply With Quote #20

Quote:
Originally Posted by yas17sin View Post
so you mean i have no steam server -_-

EDIT : then here you go proff : http://prntscr.com/e69e50
Doesn't matter friend. Dproto makes servers non steam.
__________________
Relaxing is offline
Reply



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 09:16.


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