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

[Any] Allow Admins to spectate the other team


Post New Thread Reply   
 
Thread Tools Display Modes
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 03-14-2012 , 21:33   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #21

*post removed.

Ask me if you want to see the code I had - don't want people thinking I'm jumping their work!!
__________________
View my Plugins | Donate

Last edited by TnTSCS; 03-14-2012 at 22:05.
TnTSCS is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 03-15-2012 , 03:45   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #22

try this one
Attached Files
File Type: sp Get Plugin or Get Source (forcecamera.sp - 220 views - 5.9 KB)
Despirator is offline
Corneus
SourceMod Donor
Join Date: Feb 2012
Location: iFrame
Old 03-15-2012 , 09:03   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #23

Doesn't work, because admin can spec only 1 random player without possibility to change him.
Corneus is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-15-2012 , 13:13   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #24

final code, just ~120 lines and working smoothly on css (for me).. can sb test it on other games as well pls? =)
Attached Files
File Type: sp Get Plugin or Get Source (Admin_UnforceCam.sp - 236 views - 2.9 KB)

Last edited by Dreamy; 03-15-2012 at 13:37.
Dreamy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-15-2012 , 15:25   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #25

Is there any reason we're removing all our old code posts? I was under the impression that the forum mods frowned on that sort of thing.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 03-15-2012 , 18:31   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #26

Powerlord, you're right. Here's a more complete code of the version I removed:

Still working on code for forcing specmode_firstperson though
code
__________________
View my Plugins | Donate

Last edited by TnTSCS; 03-15-2012 at 18:31.
TnTSCS is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-16-2012 , 12:37   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #27

You can do this easily with a hook here is a quick example

Example

Gamedata


The example requires DHooks

All the example does is even with mp_forcecamera 1 it still allows everybody to spec anybody (I was too lazy to add anything else to it). But if someone wants to use it they are free to use this method if they want. Note that I only provided the gamedata for cstrike. But if someone wants the offset for another game feel free to ask and ill try to get them.

Last edited by Dr!fter; 03-16-2012 at 12:42.
Dr!fter is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-16-2012 , 13:18   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #28

haha really thought about taking your awesome extension (did it with sdkhooks b4 but hooking playerthink kinda felt wrong)..
+i didnt know how to get those offsets..

dammit its only in alpha, but I already love it
Dreamy is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-16-2012 , 13:43   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #29

Quote:
Originally Posted by Dreamy View Post
haha really thought about taking your awesome extension (did it with sdkhooks b4 but hooking playerthink kinda felt wrong)..
+i didnt know how to get those offsets..

dammit its only in alpha, but I already love it
http://wiki.alliedmods.net/Finding_Virtual_Offsets Thats a tutorial on how to get them.

Also, its only in pre alpha since I didnt test it fully (I didnt test all the possible combinations of params/returns which if something is wrong can cause a crash) and Im still adding param types/other things. But its safe to use (as long as you test the hook) and wont change much in terms of what is there already.

As for your pm for the offsets for TF2
Gamedata


If it dosnt work let me know. Linux should be right, but windows might not.

Edit:
Also just realized you can get them from here http://www.sourcemodplugins.org/inde...=vtableoffsets Select the game and search for "IsValidObserverTarget"

Last edited by Dr!fter; 03-16-2012 at 14:10.
Dr!fter is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 03-16-2012 , 18:11   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #30

So should I wait for a DHooks-based plugin or does one of the above succeed? I already crashed my Arena server several times (my fault, obviously) by doing this so I'd rather have something at least semi-stable to test.
FudgePoly 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 02:15.


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