| Forum Home > HL1 Programming > [C++] Thirdperson | ||
|---|---|---|
|
Site Owner Posts: 36 |
cvar: cvar_t *thirdperson; cvar_t *thirdpersonup; cvar_t *thirdpersonback; cvar_t *thirdpersonright; regcmd: thirdperson = g_Engine.pfnRegisterVariable("prefix_cam","0",0); thirdpersonback = g_Engine.pfnRegisterVariable("prefix_cam_chase_back","80",0); thirdpersonup = g_Engine.pfnRegisterVariable("prefx_cam_chase_up","40",0); thirdpersonright = g_Engine.pfnRegisterVariable("prefix_cam_chase_right","0",0); createmove: if(thirdperson->value) { g_Engine.pfnGetCvarPointer("chase_active")->value = 1; g_Engine.pfnGetCvarPointer("r_drawviewmodel")->value = 0; g_Engine.pfnGetCvarPointer("chase_up")->value = thirdpersonup->value; g_Engine.pfnGetCvarPointer("chase_back")->value = thirdpersonback->value; g_Engine.pfnGetCvarPointer("chase_right")->value = thirdpersonright->value; } | |
| ||