.qc (dot qc) - the group for quake c coders of all denominations. If you make quake one mods and write code in quake c, join our group! I'll try to answer any quake c questions - please post your inquiry in the forums...
Posts | ||
---|---|---|
Print and formatting | Locked | |
Thread Options | ||
|
Jan 13 2014 Anchor | |
Display of data in the console is mostly a developer concern. With quake, you can not, however, use a formatted printf type statement. // defs.qc // when client is specified, only that client will get the message // tricky coder! // print to console // print to every console for all connected clients and server // to display float / integer data you need "float to string" // to display vector data you need "vector to string" - vectors are float / integer data as well Here is how to display some numerical data: // code samples // bprint to console (this example could be used in ammo_touch of items.qc) // finish with a new line so the next print doesnt just tag it on to our recent print You can have complex print data - you have to put it together ONE printed string at a time! // comes with the flame thrower add in with my mods // multi string example with numeric data Now you can notify players of danger and be apprised of game state changes while you are coding your mod. Quake C manual ver 3.4 entries: 8.9 Print messages Function: bprint void bprint (string text) Broadcast a message to all players on the current server. Function: centerprint void centerprint( entity client, string text) Sends a message to a specific player, and print it centered. Function: sprint void sprint (entity client, string text) Sends a message to a player. Edited by: numbersix |
Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.