A Pain

A_Pain is a code pointer used in the pain animation for the Player and various monsters.

just plays the monster's "pain sound" (if it has one). For example, in the case of the player that is DSPLPAIN.

Uses
The  code pointer appears in the following states in Doom's state table:

Example
The following is an example of how to set the  code pointer in a Dehacked file:

Pointer 21 (Frame 34) Codep Frame = 777

Or using BEX syntax:

[CODEPTR] Frame 1234 = Pain