Disable spectating for certain players
Hello everyone.
Is it possible to disable spectating for certain players? For example, I want for VIP's to have an ability that they can not be spectated by other players without admin kick flag. Can it be done with solid black ScreenFade? Thank you. |
Re: Disable spectating for certain players
Yes, you can try to hook SpecHealth2 message (to get target id) and set permanent black ScreenFade until next round or spawn event begins.
|
Re: Disable spectating for certain players
Quote:
All players will disconnect from your server. Message for OP: Please don't overkill VIP features. Noone would sit watching a black screen for 3 minutes, over and over. Close this thread, barely trashing. Don't suggest bad ideas either examples/solutions. |
Re: Disable spectating for certain players
You don't need to set to a black screen, just set to another player who is not a VIP. If only VIP's are playing, then set to black screen, or something.
|
Re: Disable spectating for certain players
Quote:
Quote:
Can you give me the code? Thank you :D |
Re: Disable spectating for certain players
Not sure if it will work, but try using set_pev(id, pev_iuser2, target_id). It makes sense do to this because pev_iuser2 holds the id of the spectated player, but I'm not sure if modifying it will actually change anything.
|
Re: Disable spectating for certain players
Players with ADMIN_KICK can spectate all.
Players without ADMIN_KICK cannot spectate players with ADMIN_KICK. May want to add a HUD or something explaining why they are getting a black screen if no spectate-able players are available. Hardly tested. PHP Code:
|
Re: Disable spectating for certain players
This will do the job :
Code:
|
Re: Disable spectating for certain players
So you set to black if the player doesn't have the admin flag ? :nono: And I dont think your code does what he wants.
and this ? PHP Code:
|
Re: Disable spectating for certain players
I've tested the code and it worked.
I need to reset the fade to normal by reversing the bit set at the first place. I'm not giving him a good solution, I'm just following his idea. "So you set to black if the player doesn't have the admin flag ?" what's wrong with that? |
| All times are GMT -4. The time now is 04:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.