AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   source tv kicking (https://forums.alliedmods.net/showthread.php?t=312008)

Marshmallow 11-12-2018 05:31

source tv kicking
 
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

Bacardi 11-12-2018 07:59

Re: source tv kicking
 
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.

Marshmallow 11-13-2018 08:14

Re: source tv kicking
 
this cant compiled :(
Error : .sp(31) : error 180: function return type differs from prototype.
expected 'int', but got 'void'

Marshmallow 11-13-2018 08:17

Re: source tv kicking
 
and if i set them below 99 flag ex:98 can they set new admin?

Bacardi 11-13-2018 08:20

Re: source tv kicking
 
Quote:

Originally Posted by Marshmallow (Post 2623840)
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);
    }



Marshmallow 11-13-2018 08:30

Re: source tv kicking
 
!kick @spec
[SM] Kicked all spectators
oh god i compiled that and run it but kicked again :(

Bacardi 11-13-2018 11:29

Re: source tv kicking
 
2 Attachment(s)
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

Marshmallow 11-13-2018 16:13

Re: source tv kicking
 
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

Bacardi 11-13-2018 16:54

Re: source tv kicking
 
Quote:

Originally Posted by Marshmallow (Post 2623901)
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.

Marshmallow 11-13-2018 17:07

Re: source tv kicking
 
ooh thank you very much my problem solved.im so sorry for hurt you...


All times are GMT -4. The time now is 12:47.

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