Raised This Month: $51 Target: $400
 12% 

[Any] Allow Admins to spectate the other team


Post New Thread Reply   
 
Thread Tools Display Modes
FudgePoly
Senior Member
Join Date: Jul 2011
Old 04-08-2012 , 04:55   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #51

"When you're about to spec someone you shouldn't be able to" caught my attention. Are you sure you didn't mean for it to be mp_forcecamera 0? I'll test and edit this post with results...

UPDATE: The debug worked fine, the previous version in post 44 didn't. Nothing has changed, I tested both with bots and players. Normal players followed mp_forcecamera 1 and as an Admin I could spectate them all! If you could just see why the debug version would work over the one in #44 you can release this as a new plugin.

Last edited by FudgePoly; 04-08-2012 at 05:30.
FudgePoly is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 04-08-2012 , 06:57   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #52

Dude look for yourself, the only difference is:
PHP Code:
PrintToChat(this"Hook fired"); 
PHP Code:
        if(!DHookGetReturn(hReturn))
        {
            
PrintToChat(this"Change return!");
        } 
This has nothing to do with the actual plugin.

And btw this code is 95% equal to the code I posted 2 weeks ago, it just has a few more checks in IsValidTarget which I let out coz they are already handled within the source engine. Glad that its working for you now, still this is pretty strange.. sure you didn change >anything< at your server?

Last edited by Dreamy; 04-08-2012 at 07:10.
Dreamy is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 04-08-2012 , 09:34   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #53

Dreamy, I did look at the code and that's why it's so strange to me and I asked for him to check. The plugin in post 44 didn't work with bots and didn't work with 4-5 players in the server, the verbose version did work on bots and players. mp_forcecamera 1 was also forced on normal, non-admin players.

I tested both of these versions this morning with the latest version of DHooks, nothing changed in the server AT ALL. Same people, too, same amount of bots in the earlier test before I brought in the players...

I should mention that unloading the plugin in post 44 while players were in the server caused a crash, but I think that's understandable. I used the same plugin after the autorestart, though, to make sure that there are no false variables in the test...
FudgePoly is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 04-08-2012 , 10:22   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #54

Id bet you loaded it while in the server. You need to load it and then reconnect. Since the hook is only applied on connect (or when admin cache is refreshed)
Dr!fter is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 04-08-2012 , 12:05   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #55

Either way you should release the plugin as a new plugin.
FudgePoly is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 04-08-2012 , 21:04   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #56

Quote:
Originally Posted by FudgePoly View Post

I should mention that unloading the plugin in post 44 while players were in the server caused a crash, but I think that's understandable. I used the same plugin after the autorestart, though, to make sure that there are no false variables in the test...
I fixed the crash in the latest version (1.0.5-alpha) of dhooks. So you can upgrade to it. Ill add make a new plugin thread for it tomorrow.

Last edited by Dr!fter; 04-08-2012 at 21:06.
Dr!fter is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 04-09-2012 , 10:49   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #57

https://forums.alliedmods.net/showth...18#post1685318 Posted
Dr!fter is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode