Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Event event;
- void h_CG_EntityEvent(centity_t *cent, vec3_t loc)
- {
- entityState_t* es = ¢->currentState;
- if ((int)(es->event & ~EV_EVENT_BITS) == EV_BULLET_HIT_FLESH)
- {
- int target = es->eventParm; // since it just contains 1 param, we can be sure it is our target clientNum
- if (session.Convert3DTo2DCoords(players[target].origin, &x, &y) // You got the origin right here!
- {
- // register your starttime here, loop in DrawActiveFrame or wherever it constantly does anything...
- // below is just to time your message.
- event.Starttime = hooks.cg_time; // event.startTime > main.cg_time + 2000 (= 2 secs)
- draw.drawTimedMessage(event.Starttime, x, y);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement