Raised This Month: $32 Target: $400
 8% 

[Any] Allow Admins to spectate the other team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FudgePoly
Senior Member
Join Date: Jul 2011
Old 03-05-2012 , 07:02   [Any] Allow Admins to spectate the other team
Reply With Quote #1

I've been looking for a way to do this and I haven't found one yet...

I'm using Simple Spectate to give my Admins moderating options when they're dead or if they want to spectate and punish players who break the rules.

My problem is that I have mp_forcecam 1 selected in my server.cfg, I don't want players to be able to spectate the other team for obvious gameplay reasons. However, I DO want my Admins to spectate the other team for obvious moderating reasons.

I've found this plugin for AMX Mod but haven't found anything similar for Sourcemod... Can anyone please offer some assistance?
FudgePoly is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 03-12-2012 , 19:24   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #2

Anyone? It doesn't seem to be extremely difficult...
FudgePoly is offline
Doodil
Senior Member
Join Date: Mar 2012
Old 03-13-2012 , 14:15   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #3

Have you tried that other plugin?
I kinda think he switches every dead admin to spectator until the round begins again or am I wrong there?
Doodil is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-13-2012 , 17:14   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #4

edit: sry, fail post.

Last edited by Dreamy; 03-13-2012 at 17:19.
Dreamy is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 03-13-2012 , 17:25   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #5

Quote:
Originally Posted by Doodil View Post
Have you tried that other plugin?
I kinda think he switches every dead admin to spectator until the round begins again or am I wrong there?
The "other plugin" is an AMX Mod plugin, I use Sourcemod naturally.

Quote:
Originally Posted by Dreamy View Post
edit: sry, fail post.
Why is that a fail post? I just tried it (I saw it before the edit) and my Admin said he could spectate the other team! Tell me your secrets, oh Dreamy one!

EDIT: Yeah I just figured by reading it, normal players will fade to black when they die right? Damn. If you could offer something else I'll be really grateful, you seem awfully helpful around here.

Last edited by FudgePoly; 03-13-2012 at 17:27.
FudgePoly is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-13-2012 , 17:36   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #6

ye no fail post afterall xD thought u can still see the radar after the fade, which apparently is NOT the case ;)

here it is:
PHP Code:
#include <sourcemod>

#define FFADE_OUT           0x0002  
#define FFADE_STAYOUT       0x0008
#define FFADE_PURGE         0x0010

public Plugin:myinfo 
{
    
name "FadeForce",
    
author "Dreamy",
    
description "mp_forcecam done via screen fade",
    
version "1.0",
    
url "SourceMod.net"
}

public 
OnPluginStart()
{
    
ServerCommand("mp_forcecamera 0");
    
ServerCommand("mp_fadetoblack 0");
    
HookEvent("player_spawn"Event_Spawn);
    
HookEvent("player_death"Event_Death);
}

public 
Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{    
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if (
GetClientTeam(client) < 2)
        
FadeToBlack(client);
}

public 
Event_Death(Handle:event, const String:name[], bool:dontBroadcast)
    
FadeToBlack(GetClientOfUserId(GetEventInt(event"userid")));

FadeToBlack(client
{
    if (
GetUserAdmin(client) != INVALID_ADMIN_ID)
        return;
    
    new 
Handle:hFadeClient StartMessageOne("Fade",client);
    
BfWriteShort(hFadeClient0);
    
BfWriteShort(hFadeClient0);
    
BfWriteShort(hFadeClient, (FFADE_OUT|FFADE_PURGE|FFADE_STAYOUT));
    
BfWriteByte(hFadeClient0);
    
BfWriteByte(hFadeClient0);
    
BfWriteByte(hFadeClient0);    
    
BfWriteByte(hFadeClient255);
    
EndMessage();

what else do u want?

Last edited by Dreamy; 03-13-2012 at 17:37.
Dreamy is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 03-14-2012 , 10:23   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #7

Quote:
Originally Posted by Dreamy View Post
ye no fail post afterall xD thought u can still see the radar after the fade, which apparently is NOT the case ;)

here it is:
what else do u want?
I appreciate the coding effort but your system isn't working well. From what I can tell it does allow my admin to spectate the other team but normal players have a black screen every time they die...

I just want my admins to be able to spectate everyone with nothing else changing.

EDIT: upon further inspection all your plugin does is change mp_forcecamera to 0 (which I can do in my server.cfg but of course players will be able to spectate the other team) and then cause non-admins to get a black screen. Any other ideas?

Last edited by FudgePoly; 03-14-2012 at 10:26.
FudgePoly is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 03-14-2012 , 10:42   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #8

*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:07.
TnTSCS is offline
Dreamy
SourceMod Donor
Join Date: Mar 2012
Old 03-14-2012 , 11:55   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #9

*post removed.
coz im maaaaad!

Last edited by Dreamy; 03-15-2012 at 00:15.
Dreamy is offline
FudgePoly
Senior Member
Join Date: Jul 2011
Old 03-14-2012 , 12:05   Re: [Any] Allow Admins to spectate the other team
Reply With Quote #10

If it works it's some workaround I guess, but maybe we can work from there? Instead of creating a timer, would it be possible to deny the command entirely (but silently) and instead supply the user with his next target manually?
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 05:33.


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