|
Author
|
Message
|
|
Senior Member
|

06-16-2012
, 09:20
Wondering about a kindof hook
|
#1
|
Hi,
Right now I'm maintaining lists within the plugin about
1- Spawnable players
2- Team ids of players, period (i.e. regardless if they're spawnable or not)
This is mostly because I use a lot of references for this list and it's just optimal to make this work this way, instead of recalculating the data from scratch each time my functions get called.
I'm currently hooking the TeamInfo message and update the list here. I've hooked TeamInfo using a Orpheu way instead of the standard AMXX way. It's more efficient...
But I'm wondering... I still have some sort of problems with the list of spawnable players.
Say a user joins a team, but just does not choose it's appearance. In this case he's stuck to be dead and cannot be spawned until he chooses his appearance.
I am wondering if there would be something I could hook in order to perfectly know, right right after he chooses his appearance, so I can update my lists instantly.
I would use this hook in conjunction with my TeamInfo hook and it would be perfect... Would have been wonderful if TeamInfo was called too just after the player chooses his appearance. But it's not the case (there would be no point either...).
Also, as a side question. Is there any function I could hook which would be called both when a player joins a team and when he chooses his team? It's most likely a dream, just wondering...
I thought about hooking CheckWinConditions since it's called on some team joins and recalculate from scratch things there, but it's definitely not called always... since when the time comes where FPlayerCanRespawn() ends, it's not called anymore on team joins...
Thanks!
Misery
Last edited by Misery; 06-16-2012 at 10:41.
|
|
|
|