Alright so this is for my teleport command, which a few people are running.
I am trying to implement the ability to not get stuck in walls when you are aiming at one, but I'm not sure how to go about it.
This is what I have at the moment:
//get endpoint for teleport
new Handle:trace = TR_TraceRayFilterEx(vOrigin, vAngles, MASK_SHOT, RayType_Infinite, TraceEntityFilterPlayer);
g_pos += 10.0;
PrintToChat(client, "[SM] %s", "Could not teleport player");
I am assuming I will have to use GetVectorDistance(vOrigin,g_pos), subtract a bit off it, and then combine that with the view angles to somehow get the end point.
Any help would be muchly appreciated.