Backpack Weight
Moderator: InsideQC Admins
12 posts
• Page 1 of 1
Backpack Weight
Guys, I need a hand again.
Currently in my mod your backpack has a weight value (depending on how much ammo and how many weapons you are carrying).
Right now it will sprint the value when you pick up ammo 50% of the time.
I'd like that it was permanent up in the righthand corner instead of the FPS value.
Can someone point me in the right direction?
Thanks in advance.
Currently in my mod your backpack has a weight value (depending on how much ammo and how many weapons you are carrying).
Right now it will sprint the value when you pick up ammo 50% of the time.
I'd like that it was permanent up in the righthand corner instead of the FPS value.
Can someone point me in the right direction?
Thanks in advance.
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
i think that it would be needed in the engine to do that
or maybe csqc, but i dont know much about that atm
or maybe csqc, but i dont know much about that atm
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
Sounds like you may need to construct centerprints by hand.
If your centerprints are using less then about 4 the 7 strongs they can receive, then you can use probably the remaining 3 to print the weight at the bottom.
Otherwise, you may be constructing centerprints manually. See Frik's Tetris mod for an example. If you are targetting an enging with DP_SV_WRITEUNTERMINATEDSTRING then it will be a lot easier...
If your centerprints are using less then about 4 the 7 strongs they can receive, then you can use probably the remaining 3 to print the weight at the bottom.
Otherwise, you may be constructing centerprints manually. See Frik's Tetris mod for an example. If you are targetting an enging with DP_SV_WRITEUNTERMINATEDSTRING then it will be a lot easier...
-

Lardarse - Posts: 266
- Joined: Sat Nov 05, 2005 1:58 pm
- Location: Bristol, UK
I'm trying this in PlayerPreThink:
It won't compile. How can I get the "z" to print the variable self.weight?
- Code: Select all
z = ftos(self.weight);
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nyour backpack weighs" z "pounds");
It won't compile. How can I get the "z" to print the variable self.weight?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
perhaps you could try somthing with gyro to get that to work,
somthing with mass and can....err... perhaps i should fully cook my ideas before i serve them, heh
somthing with mass and can....err... perhaps i should fully cook my ideas before i serve them, heh
bah
- MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
- Code: Select all
z = ftos(self.weight);
centerprint (self, "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nYour Backpack Weighs", z, "pounds");
fixed, use that
-

Error - InsideQC Staff
- Posts: 865
- Joined: Fri Nov 05, 2004 5:15 am
- Location: VA, USA
That didn't work, but I did figure it out:
- Code: Select all
x = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nbackpack weight: ";
y = ftos(self.weight);
z = " pounds";
specialprint (self, x, y, z);
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
-

redrum - Posts: 410
- Joined: Wed Mar 28, 2007 11:35 pm
- Location: Long Island, New York
The alternate version doesn't work any differently.
void(...) centerprint = #whatever; works as expected with all qc compilers, though most people create multiple versions if they want support for more than just frikqcc/fteqcc due to the benefits of type checking.
void(...) centerprint = #whatever; works as expected with all qc compilers, though most people create multiple versions if they want support for more than just frikqcc/fteqcc due to the benefits of type checking.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Spike wrote:void(...) centerprint = #whatever; works as expected with all qc compilers, though most people create multiple versions if they want support for more than just frikqcc/fteqcc due to the benefits of type checking.
Which is why it'smore usually void(entity client, string s, ...) centerprint = #73; to force the first two inputs to be correct.
-

Lardarse - Posts: 266
- Joined: Sat Nov 05, 2005 1:58 pm
- Location: Bristol, UK
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest