Post: [CODE] Trace Bullet
09-09-2011, 12:36 AM #1
Blackstorm
Veni. Vidi. Vici.
(adsbygoogle = window.adsbygoogle || []).push({}); Here's my super small script for getting bullet trace, it can be used for stuff like teleporting people to your crosshair, or for getting the position of your crosshair, or forge mode, etc.


Here it is:

    
TraceBullet()
{
return BulletTrace(self getEye(), anglesToForward(self getPlayerAngles()) * 1000000, 1, self);
}


Example Usage:

    
doCrosshairTeleport()
{
self endon("death");
self endon("disconnect");
for (;Winky Winky
{
self waittill("weapon_fired");
self setOrigin(self TraceBullet()["position"]);
self iPrintlnBold("Teleported to crosshair!");
}
}



For the people that don't know, it returns 3 arrays, ["position"], ["normal"], and ["entity"].

Enjoy. Awesome face
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Blackstorm for this useful post:

iReset Nigga
09-09-2011, 11:55 AM #2
iReset Nigga
2Fresshh!!
Originally posted by Blackstorm View Post
Here's my super small script for getting bullet trace, it can be used for stuff like teleporting people to your crosshair, or for getting the position of your crosshair, or forge mode, etc.


Here it is:

    

i Just used The 1 From W@W lol it does the same thing as this but urs is shorter so thats a + :p
TraceBullet()
{
return BulletTrace(self getEye(), anglesToForward(self getPlayerAngles()) * 1000000, 1, self);
}


Example Usage:

    
doCrosshairTeleport()
{
self endon("death");
self endon("disconnect");
for (;Winky Winky
{
self waittill("weapon_fired");
self setOrigin(self TraceBullet()["position"]);
self iPrintlnBold("Teleported to crosshair!");
}
}



For the people that don't know, it returns 3 arrays, ["position"], ["normal"], and ["entity"].

Enjoy. Awesome face


i just Used the 1 from W@W it does the same thing as this but urs is shorter so thats a + and ur new ufo code got a unknown Function :(
09-09-2011, 12:33 PM #3
247Yamato
< ^ > < ^ >
It also returns ["surfacetype"] and ["fraction"], the types of surfaces are:

asphalt
bark
brick
carpet
cloth
concrete
default
dirt
flesh
foliage
glass
grass
gravel
ice
metal
mud
paper
rock
sand
snow
water
wood

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo