//this gets a pointer to the viewmodel
cl_entity_t* viewmodel = gEngfuncs.GetViewModel();
if (viewmodel)
{
//I just set it to the sine of the time because that's what I need but yeah
viewmodel->curstate.controller[0] = (sin(gpGlobals->time);
}