In a message you "say", you can use the following escapes:

%%        literal percent sign
%a        current armor value
%h        current health
%w        current weapon
%W        current ammo type

%x        name of entity pointed at
%p        name of player you look at

%l        current location
%y        location pointed at
%d        location last died at

The latter three need location data or use nearby weapons instead. Location
data are entities of type target_location with a netname that replaces the
escape.

The location entity for a point is chosen by the following algorithm:

- the closest four entities are found
- of these, the first one which is actually VISIBLE to the point is chosen
- if there is no line of sight from the point to any of the four location
  entities, the closest one is chosen

Of course you can use these escapes in key bindings and aliases; examples:

alias asay_ctf_flagcarrier "say_team flag carrier at %y"
alias asay_ctf_haveflag "say_team (%l) have the flag"
alias asay_willgo "say_team will go to %y"
alias asay_support "say_team (%l) need help, %h%%"
alias asay_killed "say_team got killed at %d"
alias asay_noammo "say_team (%l) need %W for %w"
alias asay_drop "say_team (%l) dropped %w ; impulse 17"
