#include <tf2_stocks> // in global scope, obviously // in your function: if (TF2_GetPlayerClass(client) == TFClass_DemoMan) { /* ... */ }