AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   user origin 4 (bullet hit) (https://forums.alliedmods.net/showthread.php?t=61840)

kp_uparrow 10-12-2007 02:31

user origin 4 (bullet hit)
 
get_user_origin mode 4 (where bullet will hit)

on some servers the first place that the bullet hits somewhere
on some servers its the second(last?) place that the bullet hits somewhere

anyone experince this before?

i was trying to get an mushroom sprite on where the bullet first hits, one of my servers will create a mushroom on first bullet on ALL weapons, another one will only have a mushroom if the gun's ammo do not penetrate walls (glock usp mp5...), and ones that do penetrate walls(ak m4 awp...), will have a mushroom on the second hit point behind something(has to go through something in order to have a mushroom), which 95% of the time you wont see

the servers are on different boxes, thats probably the reason

any way to force it detect first bullet hit?

kp_uparrow 10-12-2007 03:00

Re: user origin 4 (bullet hit)
 
for example (last hitpoint), im aiming at a wall, bought m4, fired usp, m4, m4, usp, they get different origins


origin 4 279 2048 -82 (usp)
origin 4 -1546 -1423 -149 (m4a1)
origin 4 -1544 -1424 -169 (m4a1)
origin 4 279 2048 -82 (usp)

VEN 10-12-2007 13:39

Re: user origin 4 (bullet hit)
 
I can say that such issue(s) already known since it was reported few times. It was partially fixed but will not be fixed fully (see bugs section for details). Also i can say that if you care about accuracy i'd rather recommend use HS/FM modules for that.

kp_uparrow 10-12-2007 14:20

Re: user origin 4 (bullet hit)
 
how i get bullet hit from fakemeta?

Wilson [29th ID] 10-12-2007 21:01

Re: user origin 4 (bullet hit)
 
Code:
public plugin_init() {     register_forward( FM_TraceLine, "fwd_TraceLine" ); } public fwd_TraceLine( Float:start[3], Float:end[3], nomonsters, enttoskip, ptr ) {     // start is the starting point of the trace/bullet line     // end is the ending point of the trace/bullet line }

If this doesn't solve your problem, another idea is to shoot a trace and test if it makes it all the way.

By using FM Utilities, you can run:
fm_trace_line( id, fStartOrigin, fEndOrigin, fStop );

Then test if fStop is equal to fEndOrigin. If not, it hit something at fStop (such as a box or wall).

kp_uparrow 10-13-2007 13:43

Re: user origin 4 (bullet hit)
 
trace_line from player to endpoint worked thx


All times are GMT -4. The time now is 07:58.

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