Forum

Quick CSQC stuff

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Quick CSQC stuff

Postby EMR » Tue Dec 14, 2010 7:26 pm

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);
EMR
 
Posts: 13
Joined: Mon Oct 11, 2010 8:08 pm

Postby Supa » Wed Dec 15, 2010 6:51 am

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. :)
User avatar
Supa
 
Posts: 164
Joined: Tue Oct 26, 2004 8:10 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest