I have been messing around with
PHP Code:
const OFFSET_PAINSHOCK = 108 // ConnorMcLeod
set_pdata_float(id, OFFSET_PAINSHOCK, 1.0);
You can actually call it anywhere and get pained btw.
What i'm interested is how do valve calculate the value for painshock.
It does seem to depend on the damage of weapon and from how many hits in a row taken.