Advertisement
Guest User

Untitled

a guest
Apr 12th, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. Event event;
  2.  
  3. void h_CG_EntityEvent(centity_t *cent, vec3_t loc)
  4. {
  5.     entityState_t* es = &cent->currentState;
  6.  
  7.     if ((int)(es->event & ~EV_EVENT_BITS) == EV_BULLET_HIT_FLESH)
  8.     {
  9.         int target = es->eventParm; // since it just contains 1 param, we can be sure it is our target clientNum
  10.        
  11.         if (session.Convert3DTo2DCoords(players[target].origin, &x, &y) // You got the origin right here!
  12.         {
  13.             // register your starttime here, loop in DrawActiveFrame or wherever it constantly does anything...
  14.             // below is just to time your message.
  15.             event.Starttime = hooks.cg_time; // event.startTime > main.cg_time + 2000 (= 2 secs)
  16.  
  17.             draw.drawTimedMessage(event.Starttime, x, y);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement