AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [Any] Allow Admins to spectate the other team (https://forums.alliedmods.net/showthread.php?t=179757)

FudgePoly 03-05-2012 07:02

[Any] Allow Admins to spectate the other team
 
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 03-12-2012 19:24

Re: [Any] Allow Admins to spectate the other team
 
Anyone? It doesn't seem to be extremely difficult...

Doodil 03-13-2012 14:15

Re: [Any] Allow Admins to spectate the other team
 
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?

Dreamy 03-13-2012 17:14

Re: [Any] Allow Admins to spectate the other team
 
edit: sry, fail post.

FudgePoly 03-13-2012 17:25

Re: [Any] Allow Admins to spectate the other team
 
Quote:

Originally Posted by Doodil (Post 1668164)
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 (Post 1668315)
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.

Dreamy 03-13-2012 17:36

Re: [Any] Allow Admins to spectate the other team
 
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?

FudgePoly 03-14-2012 10:23

Re: [Any] Allow Admins to spectate the other team
 
Quote:

Originally Posted by Dreamy (Post 1668333)
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?

TnTSCS 03-14-2012 10:42

Re: [Any] Allow Admins to spectate the other team
 
*post removed.

Ask me if you want to see the code I had - don't want people thinking I'm jumping their work!!

Dreamy 03-14-2012 11:55

Re: [Any] Allow Admins to spectate the other team
 
*post removed.
coz im maaaaad!

FudgePoly 03-14-2012 12:05

Re: [Any] Allow Admins to spectate the other team
 
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?


All times are GMT -4. The time now is 03:33.

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