Catching Class Selection
Does anyone know how to determine when the player has selected a class? To clarify, when choosing a team, you first select your team, and then a class. I want to determine when the class has been selected. I don't care what class. Just that any class has been chosen, thus the player is formally in the game.
|
For which mod?
|
I believe he's talking about CS with VGUI menus, we were discussing this earlier in IRC and I told him to take a look at the WeaponMod Lite plugin that I ported.
I assume you couldn't find a way to hook the menu? ;\ |
Yes, CS.
The best I've been able to do thus far is to determine when the "select class" menu appears. Haven't been able to get to the other side yet. |
Sorry that it's got all the surf stuff in it, but that's what I used it for. This is the best I've been able to do to check when someone has selected their model:
EDIT: Also ignore "client_putinserver", it calls some stuff that's really irrelevant to this particular thing. Code:
Code:
Code:
Code:
Code:
Code:
|
I just breezed through your code, so I may have missed something, but essentially you're just checking to see if the player's model changed from what it was when they spawn, correct?
While that would tell me that they've selected a class, it wouldn't tell me until they spawn, which could be seconds or minutes after they've selected the class. I need to know immediately. |
No actually it does tell you right away. Try it before you dismiss it.
|
I will try it.
In the meantime, I'd appreciate it if you could read what I wrote again and tell me where I was dismissive. Quote:
|
Sigh, yes that's basically what it does. I haven't bumped into anything else that has been able to do it and therefore had to make a stupid and hackish method myself.
|
I was testing in preThink comparing cs_get_user_model, the problem is that by default (upon joining) it is "urban", so if you picked the urban model itself there would be no change and it wouldn't signal that you have selected your "class."
|
| All times are GMT -4. The time now is 00:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.