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

source tv kicking


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Marshmallow
Member
Join Date: Nov 2018
Old 11-12-2018 , 05:31   source tv kicking
Reply With Quote #1

hello i have problem with kicking source tv by root admins.when they run a match , use kick @spec command and source tv was kicking with players maybe help me

Last edited by Marshmallow; 11-12-2018 at 05:33.
Marshmallow is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-12-2018 , 07:59   Re: source tv kicking
Reply With Quote #2

here is one old post... https://forums.alliedmods.net/showth...25#post1479525

But I update this little bit.
And this give only admin immunity level 98. Nothing else.

PHP Code:

#define IMMUNITY_LEVEL 98

public void OnPluginStart()
{
    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }
}

public 
void OnClientPostAdminCheck(int client)
{
    if(
IsClientReplay(client) || IsClientSourceTV(client))
    {

        
AdminId admin GetUserAdmin(client);

        if(
admin != INVALID_ADMIN_ID) return;


        
char name[MAX_NAME_LENGTH];
        
Format(namesizeof(name), "%N"client);

        
admin CreateAdmin(name);
        
SetAdminImmunityLevel(adminIMMUNITY_LEVEL);
        
SetUserAdmin(clientadmintrue);
        
PrintToServer("[SM] Immunity Level %i set to %s"IMMUNITY_LEVELname);
    }
}

public 
void OnRebuildAdminCache(AdminCachePart part)
{
    if(
part != AdminCache_Admins) return;

    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }

Second thing.
You should not grant anyone with admin flag "z" (root).
Quote:
https://wiki.alliedmods.net/Adding_A...rceMod)#Levels
root z Magically enables all flags and ignores immunity values.
Root flag will give you more problems.
So it is better give all flags without "z" flag and set immunity below 98 they can't kick SourceTV or Replay anymore.

Last edited by Bacardi; 11-12-2018 at 08:08. Reason: big update
Bacardi is offline
Marshmallow
Member
Join Date: Nov 2018
Old 11-13-2018 , 08:14   Re: source tv kicking
Reply With Quote #3

this cant compiled
Error : .sp(31) : error 180: function return type differs from prototype.
expected 'int', but got 'void'
Marshmallow is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-13-2018 , 08:20   Re: source tv kicking
Reply With Quote #4

Quote:
Originally Posted by Marshmallow View Post
this cant compiled
Error : .sp(31) : error 180: function return type differs from prototype.
expected 'int', but got 'void'
yeah, if you try compile with online compiler...
PHP Code:
#define IMMUNITY_LEVEL 98

public void OnPluginStart()
{
    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }
}

public 
void OnClientPostAdminCheck(int client)
{
    if(
IsClientReplay(client) || IsClientSourceTV(client))
    {

        
AdminId admin GetUserAdmin(client);

        if(
admin != INVALID_ADMIN_ID) return;


        
char name[MAX_NAME_LENGTH];
        
Format(namesizeof(name), "%N"client);

        
admin CreateAdmin(name);
        
SetAdminImmunityLevel(adminIMMUNITY_LEVEL);
        
SetUserAdmin(clientadmintrue);
        
PrintToServer("[SM] Immunity Level %i set to %s"IMMUNITY_LEVELname);
    }

__________________
Do not Private Message @me
Bacardi is offline
Marshmallow
Member
Join Date: Nov 2018
Old 11-13-2018 , 08:30   Re: source tv kicking
Reply With Quote #5

!kick @spec
[SM] Kicked all spectators
oh god i compiled that and run it but kicked again
Marshmallow is offline
Marshmallow
Member
Join Date: Nov 2018
Old 12-08-2018 , 11:57   Re: source tv kicking
Reply With Quote #6

Quote:
Originally Posted by Bacardi View Post
here is one old post... https://forums.alliedmods.net/showth...25#post1479525

But I update this little bit.
And this give only admin immunity level 98. Nothing else.

PHP Code:

#define IMMUNITY_LEVEL 98

public void OnPluginStart()
{
    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }
}

public 
void OnClientPostAdminCheck(int client)
{
    if(
IsClientReplay(client) || IsClientSourceTV(client))
    {

        
AdminId admin GetUserAdmin(client);

        if(
admin != INVALID_ADMIN_ID) return;


        
char name[MAX_NAME_LENGTH];
        
Format(namesizeof(name), "%N"client);

        
admin CreateAdmin(name);
        
SetAdminImmunityLevel(adminIMMUNITY_LEVEL);
        
SetUserAdmin(clientadmintrue);
        
PrintToServer("[SM] Immunity Level %i set to %s"IMMUNITY_LEVELname);
    }
}

public 
void OnRebuildAdminCache(AdminCachePart part)
{
    if(
part != AdminCache_Admins) return;

    for(
int client 1client <= MaxClientsclient++)
    {
        if(
IsClientInGame(client) && IsFakeClient(client)) OnClientPostAdminCheck(client);
    }

Second thing.
You should not grant anyone with admin flag "z" (root).


Root flag will give you more problems.
So it is better give all flags without "z" flag and set immunity below 98 they can't kick SourceTV or Replay anymore.

Hi duffy may be help me i run ip range ban in my server?

Last edited by Marshmallow; 12-08-2018 at 12:18.
Marshmallow is offline
Marshmallow
Member
Join Date: Nov 2018
Old 11-13-2018 , 08:17   Re: source tv kicking
Reply With Quote #7

and if i set them below 99 flag ex:98 can they set new admin?
Marshmallow is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-13-2018 , 11:29   Re: source tv kicking
Reply With Quote #8

lets try again....
Get sourcetv_immunity.smx file

When you have moved to Sourcemod plugins, change map.
Make sure your admins not have admin flag Z and immunitylevel above 98.

To check admins cache, type in server console
sm_dump_admcache

you get file in server. Post it here so I can check.
Code:
Admin cache dumped to: F:\asd_Server\counter-strike global offensive\csgo\addons\sourcemod\data\admin_cache_dump.txt
Attached Files
File Type: sp Get Plugin or Get Source (sourcetv_immunity.sp - 188 views - 946 Bytes)
File Type: smx sourcetv_immunity.smx (4.1 KB, 87 views)
__________________
Do not Private Message @me
Bacardi is offline
Marshmallow
Member
Join Date: Nov 2018
Old 11-13-2018 , 16:13   Re: source tv kicking
Reply With Quote #9

tnx thats good.but if i dont give them root admin,they cannot have admin manager menu and add new admin menu. i sell server to one body.and he will be need to z flag for giving him players admin.this is my problem.i want this : A Admin can add new admin but cant kick source tv.
and i have css no csgo

Last edited by Marshmallow; 11-13-2018 at 16:28.
Marshmallow is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-13-2018 , 16:54   Re: source tv kicking
Reply With Quote #10

Quote:
Originally Posted by Marshmallow View Post
tnx thats good.but if i dont give them root admin,they cannot have admin manager menu and add new admin menu. i sell server to one body.and he will be need to z flag for giving him players admin.this is my problem.i want this : A Admin can add new admin but cant kick source tv.
and i have css no csgo
you mean this or else ?
[ANY] Admins Manager v1.2.1

You can try override command access. To change menu/commands default root "z" flag to else.
From admin_overrides.cfg
Code:
Overrides
{
	/**
	 * By default, commands are registered with three pieces of information:
	 * 1)Command Name 		(for example, "csdm_enable")
	 * 2)Command Group Name	(for example, "CSDM")
	 * 3)Command Level		(for example, "changemap")
	 *
	 * You can override the default flags assigned to individual commands or command groups in this way.
	 * To override a group, use the "@" character before the name.  Example:
	 * Examples:
	 *		"@CSDM"			"b"				// Override the CSDM group to 'b' flag
	 * 		"csdm_enable"	"bgi"			// Override the csdm_enable command to 'bgi' flags
	 *
	 * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
	 * any setting that csdm_enable previously had.
	 *
	 * You can make a command completely public by using an empty flag string.
	 */

	"sm_adminmanager"	"m" // rcon access
	"sm_groupmanager"   "m"
	"sm_addgroup"       "m"
	"sm_editgroup"      "m"
	"sm_removegroup"    "m"
	"sm_addadmin"       "m"
	"sm_editadmin"      "m"
	"sm_removeadmin"    "m"
	"sm_reloadadmins"   "m"
}
Then reload admin menu plugin and admins. Or change map.
__________________
Do not Private Message @me

Last edited by Bacardi; 11-13-2018 at 16:57.
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 18:33.


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