Storing player values that isn't reset on spawn
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
Storing player values that isn't reset on spawn
Hello! A beginner QC programmer here. I'm trying to make a small lan unmod with two different classes (one is supposed to hunt the other one). But everytime a player dies they lose their class in some way.
I started by using the class guide found on this site.
How do I change this? It's probably really easy.
I started by using the class guide found on this site.
How do I change this? It's probably really easy.
- Ran
- Posts: 3
- Joined: Thu Mar 05, 2009 4:01 pm
Simple: don't reset it!
You can use the parms stuff to transfer per-player info between levels. But that's not needed when you're not changing level, as those fields are only cleared if you clear them (or the player disconnects).
You can use the parms stuff to transfer per-player info between levels. But that's not needed when you're not changing level, as those fields are only cleared if you clear them (or the player disconnects).
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
I set it in two places. First in weapons as an impulse, second in client in ClientObituary().
I set it to the right value, everything works out (I lose my weapon just like you are supposed to, and weapon damage is changed etc. just like it's coded), the only problem is that when I respawn I lose my classtype.
I set it to the right value, everything works out (I lose my weapon just like you are supposed to, and weapon damage is changed etc. just like it's coded), the only problem is that when I respawn I lose my classtype.
- Ran
- Posts: 3
- Joined: Thu Mar 05, 2009 4:01 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest