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

Csgo danger zone spectate


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nextars
Junior Member
Join Date: Nov 2017
Old 12-04-2020 , 22:27   Csgo danger zone spectate
Reply With Quote #1

please if anyone can help me is there anyway i can let admins spectate in danger zone server ?
__________________
NEXTARS
Nextars is offline
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 12-05-2020 , 03:29   Re: Csgo danger zone spectate
Reply With Quote #2

I find it strange that players can't join spectators team in Danger Zone.

Something like this should do the trick:
PHP Code:
#include <sourcemod>
#pragma newdecls required

public void OnPluginStart()
{
    
AddCommandListener(Cmd_Jointeam"jointeam");
}

public 
Action Cmd_Jointeam(int client, const char[] commandint argc)
{
    
char arg1[2];
    
GetCmdArg(1arg1sizeof(arg1));
    
int team StringToInt(arg1);
    
    if (
team == && GetUserFlagBits(client) && ADMFLAG_GENERIC)
    {
        
ChangeClientTeam(client1);
        return 
Plugin_Handled;
    }
    else
    return 
Plugin_Continue;

Also make sure the mp_spectators_max ConVar is not set to 0.

Last edited by FAQU; 12-05-2020 at 04:05.
FAQU is offline
Nextars
Junior Member
Join Date: Nov 2017
Old 12-05-2020 , 07:06   Re: Csgo danger zone spectate
Reply With Quote #3

Thank you mate but sadly its not working
Quote:
Originally Posted by FAQU View Post
I find it strange that players can't join spectators team in Danger Zone.

Something like this should do the trick:
PHP Code:
#include <sourcemod>
#pragma newdecls required

public void OnPluginStart()
{
    
AddCommandListener(Cmd_Jointeam"jointeam");
}

public 
Action Cmd_Jointeam(int client, const char[] commandint argc)
{
    
char arg1[2];
    
GetCmdArg(1arg1sizeof(arg1));
    
int team StringToInt(arg1);
    
    if (
team == && GetUserFlagBits(client) && ADMFLAG_GENERIC)
    {
        
ChangeClientTeam(client1);
        return 
Plugin_Handled;
    }
    else
    return 
Plugin_Continue;

Also make sure the mp_spectators_max ConVar is not set to 0.
__________________
NEXTARS
Nextars is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-05-2020 , 07:54   Re: Csgo danger zone spectate
Reply With Quote #4

This?
PHP Code:
 (GetUserFlagBits(client) & ADMFLAG_GENERIC
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Nextars
Junior Member
Join Date: Nov 2017
Old 12-05-2020 , 08:42   Re: Csgo danger zone spectate
Reply With Quote #5

never mind it was warmup period which caused respawn issue and thats why i m unable to switch team to spec any idea how to do disable warmup respawns

whenever i m trying to switch team to spectator it just respawns me i think this plugin might be blocking it if anyone can help me find out which line is actually causing it
Quote:
Spoiler
__________________
NEXTARS

Last edited by Nextars; 12-05-2020 at 09:20.
Nextars is offline
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 12-05-2020 , 11:59   Re: Csgo danger zone spectate
Reply With Quote #6

Quote:
Originally Posted by Nextars View Post
Thank you mate but sadly its not working
What about this:
PHP Code:
#include <sourcemod>
#include <cstrike>
#pragma newdecls required

public void OnPluginStart()
{
    
AddCommandListener(Cmd_Jointeam"jointeam");
}

public 
Action Cmd_Jointeam(int client, const char[] commandint argc)
{
    
char arg1[2];
    
GetCmdArg(1arg1sizeof(arg1));
    
int team StringToInt(arg1);
    
    if (
team == && GetUserFlagBits(client) && ADMFLAG_GENERIC)
    {
        
CS_SwitchTeam(clientCS_TEAM_SPECTATOR);
        return 
Plugin_Handled;
    }
    else
    return 
Plugin_Continue;

FAQU 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 21:46.


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