Raised This Month: $ Target: $400
 0% 

Origin of barrel's end


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-14-2014 , 06:15   Origin of barrel's end
Reply With Quote #1

How can I get the origin of the end of a gun's end.
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
swapped
BANNED
Join Date: Mar 2014
Location: OrpheuRegisterHook
Old 05-14-2014 , 06:36   Re: Origin of barrel's end
Reply With Quote #2

PHP Code:
get_user_originindexorigin[3], mode 

Code:
0 - current position. 
1 - position from eyes (weapon aiming). 
2 - end position from player position. 
3 - end position from eyes (hit point for weapon).  
4 - position of last bullet hit (only CS).  

Last edited by swapped; 05-14-2014 at 06:37.
swapped is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-14-2014 , 06:46   Re: Origin of barrel's end
Reply With Quote #3

ok thanks..
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-15-2014 , 16:51   Re: Origin of barrel's end
Reply With Quote #4

Quote:
Originally Posted by swapped View Post
PHP Code:
get_user_originindexorigin[3], mode 

Code:
0 - current position. 
1 - position from eyes (weapon aiming). 
2 - end position from player position. 
3 - end position from eyes (hit point for weapon).  
4 - position of last bullet hit (only CS).  
I dont trust that at all.
For me it was giving false origins.

Instead i use this:
PHP Code:
RegisterHam(Ham_TraceAttack"worldspawn""traceattack")
public 
traceattack(victimattackerFloat:damageFloat:direction[3], trdamage_type)
{
    static 
Float:origin[3]
    
get_tr2(trTR_vecEndPosorigin)

If you want to use your last bullet origin in somewhere else at ohter time then just do:
PHP Code:
new Float:lastbullet_origin[id][3]
public 
traceattack(victimattackerFloat:damageFloat:direction[3], trdamage_type)
{
    
get_tr2(trTR_vecEndPoslastbullet_origin[attacker])

.Dare Devil. is offline
Reply


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


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