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

[REQ] Blinding Spectators


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 04-14-2020 , 17:31   [REQ] Blinding Spectators
Reply With Quote #1

Hello guys, I need a plugin that prevents players from seeing all players, because the following happens! Some players come with friends who tell you where the players are! So, how can I make sure that those who are in spectator can not see any team or only see one! But that Admins can still see all the players
__________________
FreezerPT is offline
CowGod
Senior Member
Join Date: Feb 2015
Old 04-15-2020 , 03:30   Re: [REQ] Blinding Spectators
Reply With Quote #2

Quote:
Originally Posted by FreezerPT View Post
Hello guys, I need a plugin that prevents players from seeing all players, because the following happens! Some players come with friends who tell you where the players are! So, how can I make sure that those who are in spectator can not see any team or only see one! But that Admins can still see all the players
Attached Files
File Type: sp Get Plugin or Get Source (spec_block.sp - 196 views - 973 Bytes)
CowGod is offline
Send a message via Skype™ to CowGod
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 04-15-2020 , 05:52   Re: [REQ] Blinding Spectators
Reply With Quote #3

Can you tell me what this do, and if the admin, cans see the players on spectate? Like this make the spectators black screen, freeze camera or what! Thanks fo the help, its now when a player is dead, its when they join to spectator

And its not working, the players can still change betwenn the players! And navigate around the map
__________________

Last edited by FreezerPT; 04-15-2020 at 06:34.
FreezerPT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-15-2020 , 07:44   Re: [REQ] Blinding Spectators
Reply With Quote #4

https://www.sourcemod.net/plugins.ph...tion=&search=1

Isn't this you wanted ?
[ANY]Admin all spectate

https://forums.alliedmods.net/showthread.php?p=1685318
__________________
Do not Private Message @me
Bacardi is offline
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 04-15-2020 , 08:13   Re: [REQ] Blinding Spectators
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
No, the problem is, I want to block the people who enter on server and join to spectators, and friends are playing and they are saying where the opponents are, because who are on spectate can see every teams and wander the map.

Like, I want something, like when they join server and go to spect, they can't move from a random place, like they freeze on a random place, and cant spectate the players!
__________________

Last edited by FreezerPT; 04-15-2020 at 08:21.
FreezerPT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-15-2020 , 11:51   Re: [REQ] Blinding Spectators
Reply With Quote #6

This version only blind spectator. Admins with flag "b" are bypassing this.

PHP Code:
#include <sdktools>

UserMsg g_FadeUserMsgId;


public 
void OnPluginStart()
{
    
g_FadeUserMsgId GetUserMessageId("Fade");
    
HookEventEx("switch_team"switch_team);
}

public 
void switch_team(Event event, const char[] namebool dontBroadcast)
{
    
int[] targets = new int[MaxClients]
    
int count;


    for(
int client 1client <= MaxClientsclient++)
    {
        if(!
IsClientInGame(client) || IsFakeClient(client)) continue;
        
        if(
GetClientTeam(client) > 1) continue;
        
        if(
CheckCommandAccess(client"sm_allow_spec"ADMFLAG_GENERIC)) continue;

        
targets[count++] = client;
    }

    if(
count == 0) return;

    
// sm_blind
    
int amount 255;
    
int duration 500;
    
int holdtime 500;
    
int flags;
    if (
amount == 0)
    {
        
flags = (0x0001 0x0010);
    }
    else
    {
        
flags = (0x0002 0x0008);
    }
    
    
int color[4] = { 000};
    
color[3] = amount;
    
    
Handle message StartMessageEx(g_FadeUserMsgIdtargetscount);
    if (
GetUserMessageType() == UM_Protobuf)
    {
        
Protobuf pb UserMessageToProtobuf(message);
        
pb.SetInt("duration"duration);
        
pb.SetInt("hold_time"holdtime);
        
pb.SetInt("flags"flags);
        
pb.SetColor("clr"color);
    }
    else
    {
        
BfWrite bf UserMessageToBfWrite(message);
        
bf.WriteShort(duration);
        
bf.WriteShort(holdtime);
        
bf.WriteShort(flags);        
        
bf.WriteByte(color[0]);
        
bf.WriteByte(color[1]);
        
bf.WriteByte(color[2]);
        
bf.WriteByte(color[3]);
    }
    
    
EndMessage();

Players still can follow others from mini radar. And that gigantic MAP behind ctrl button.
I don't have time to look those.
__________________
Do not Private Message @me
Bacardi is offline
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 04-15-2020 , 18:07   Re: [REQ] Blinding Spectators
Reply With Quote #7

Quote:
Originally Posted by Bacardi View Post
This version only blind spectator. Admins with flag "b" are bypassing this.

PHP Code:
#include <sdktools>

UserMsg g_FadeUserMsgId;


public 
void OnPluginStart()
{
    
g_FadeUserMsgId GetUserMessageId("Fade");
    
HookEventEx("switch_team"switch_team);
}

public 
void switch_team(Event event, const char[] namebool dontBroadcast)
{
    
int[] targets = new int[MaxClients]
    
int count;


    for(
int client 1client <= MaxClientsclient++)
    {
        if(!
IsClientInGame(client) || IsFakeClient(client)) continue;
        
        if(
GetClientTeam(client) > 1) continue;
        
        if(
CheckCommandAccess(client"sm_allow_spec"ADMFLAG_GENERIC)) continue;

        
targets[count++] = client;
    }

    if(
count == 0) return;

    
// sm_blind
    
int amount 255;
    
int duration 500;
    
int holdtime 500;
    
int flags;
    if (
amount == 0)
    {
        
flags = (0x0001 0x0010);
    }
    else
    {
        
flags = (0x0002 0x0008);
    }
    
    
int color[4] = { 000};
    
color[3] = amount;
    
    
Handle message StartMessageEx(g_FadeUserMsgIdtargetscount);
    if (
GetUserMessageType() == UM_Protobuf)
    {
        
Protobuf pb UserMessageToProtobuf(message);
        
pb.SetInt("duration"duration);
        
pb.SetInt("hold_time"holdtime);
        
pb.SetInt("flags"flags);
        
pb.SetColor("clr"color);
    }
    else
    {
        
BfWrite bf UserMessageToBfWrite(message);
        
bf.WriteShort(duration);
        
bf.WriteShort(holdtime);
        
bf.WriteShort(flags);        
        
bf.WriteByte(color[0]);
        
bf.WriteByte(color[1]);
        
bf.WriteByte(color[2]);
        
bf.WriteByte(color[3]);
    }
    
    
EndMessage();

Players still can follow others from mini radar. And that gigantic MAP behind ctrl button.
I don't have time to look those.
Thanks, I Will test it and see if it works! In relation to the Minimap or bigger One, no problem, I just want the main screen being freezed, or black( something they cant see the game from spectators) so they cant tell to friends where the players are!
__________________
FreezerPT is offline
r3v
Senior Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 04-17-2020 , 08:25   Re: [REQ] Blinding Spectators
Reply With Quote #8

Okey, Bacardi plugin works for CS:GO, but another problem is, spectators can see radar (with CTRL button). Like this one: https://i.ytimg.com/vi/xIH0DB0HQjA/maxresdefault.jpg
Still spectators can ghost where players are...

Last edited by r3v; 04-17-2020 at 08:26.
r3v is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-17-2020 , 11:49   Re: [REQ] Blinding Spectators
Reply With Quote #9

...one way is send player to team 0.
*edit
wait, maybe my bots leaved when I changed to team 0. Need re-check, bot_join_after_player 0

Last edited by Bacardi; 04-18-2020 at 12:44.
Bacardi 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:13.


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