Quick CSQC stuff

Discuss programming in the QuakeC language.
Post Reply
EMR
Posts: 13
Joined: Mon Oct 11, 2010 8:08 pm

Quick CSQC stuff

Post by EMR »

Let's say I wanted to show my current, say, ammo_nails in a CSQC hud. Where in the normal QC would I put the addstat?

Code: Select all

AddStat (AMMO_NAILS, 8, 33);
Supa
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am

Post by Supa »

Chris has a really, *really* useful writeup on getting started with CSQC and stats in general on the DP wiki, but the basic version is that you'll need to create each stat during worldspawn with an AddStat (STAT_INDEX, stat_type (1: string / 2: float / 8: integer), .your_stat_field_here) call for each new stat.

That said, by default the server will send STAT_NAILS (index 7) along with all the other basic stats, you don't have to send them manually. :)
Post Reply