Create command


(Contour) #1

Hey,
im new at coding and i want to ask how to create a command like g_thirdperson that when it’s on 0 cg_thirdperson is disabled and 1 enabled.

Thx…


(kamikazee) #2

Had this idea after playing FalckonET? :stuck_out_tongue:

You could make g_thirdperson a “serverinfo” CVar so the client will be notified when it changes. From the client side, if something in the serverinfo variables changes, you’ll need to react to it in the CG_ParseServerinfo function found in cg_servercmds.c.

Set cg_thirdperson to 1 there.