Use this to draw little lines to indicate a which direction the player is pointing. Makes it easy to see if a person is aiming at you
Credit to Tetsuo and OGC for the original Radar func
First you will need this function.
PHP Code:
Vector CalcPViewAngles(int index){
cl_entity_s *ent = gEngfuncs.GetEntityByIndex(index);
Vector forward,right,up,newfwd;
VectorCopy(ent->origin, newfwd);
gEngfuncs.pfnAngleVectors(ent->angles, forward, right, up);
// Thanks tetsuo :P im a tard
newfwd = newfwd + forward * cvar.radar_fovdist; // radar_fovdist is an int, I use 300. change to suit your own taste
return newfwd;
}
This simply calculates a point in space that is X units in front of the player, I used 300 which seemed to work well on the radar of my size.
You will also need my DrawLine function (
http://forum.game-deception.com/showthread.php?t=5736 ) Or do it however you want. if your not a retard you can figure it out
PHP Code:
void drawRadarFOV(float* origin, int playerindex, int width, int r,int g,int b, int size)
{
int startX, startY, endX, endY;
calcRadarPoint(origin, startX, startY);
calcRadarPoint(CalcPViewAngles(playerindex), endX, endY);
DrawLine(startX, startY, endX, endY, width, r, g, b, 255);
}
Now, this is pretty self explanitory, call this inside your normal radar func, or even in your ESP would work.
People were saying it looks gayish. Mostly Tetsuo <3
Change it to look however you want. I like it the way it is. But thats just me