This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[REQ] Restrict spectators for flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
trzmielu
Member
Join Date: Aug 2016
Old 06-04-2017 , 09:16   [REQ] Restrict spectators for flag
Reply With Quote #1

Hello,

is there anyway to restrict spectators for flag "t"?

Regards
trzmielu is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 06-04-2017 , 09:45   Re: [REQ] Restrict spectators for flag
Reply With Quote #2

Hi

Yes, But in which game ?

Simply listen to join spec command & block it for clients except admins with 't' flag.

If you can't, I can write it for you ;)
WatchDogs is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 06-14-2017 , 10:56   Re: [REQ] Restrict spectators for flag
Reply With Quote #3

Not tested. Test if didn't work I 'll add some fixes.

PHP Code:
#pragma semicolon 1

// To change the flag: https://sm.alliedmods.net/new-api/admin/AdminFlag
#define AdmFlag        Admin_Custom6

#define PLUGIN_AUTHOR "[W]atch [D]ogs"
#define PLUGIN_VERSION "1.0"

#include <sourcemod>

#pragma newdecls required


public Plugin myinfo 
{
    
name "Admin Spec Restrict",
    
author PLUGIN_AUTHOR,
    
description "Restrict spec team for special admin flag",
    
version PLUGIN_VERSION,
    
url "https://forums.alliedmods.net/showthread.php?t=298190"
};

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

public 
Action CMD_JoinTeam(int client, const char[] commandint args)
{
    
char sTeam[3];
    
GetCmdArg(1sTeamsizeof(sTeam));
    
    if(
StringToInt(sTeam) == 1)
    {
        if(
GetAdminFlag(GetUserAdmin(client), AdmFlag))
            return 
Plugin_Continue;
            
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

Attached Files
File Type: sp Get Plugin or Get Source (admin_spec.sp - 269 views - 898 Bytes)
WatchDogs 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 19:04.


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