Raised This Month: $42 Target: $400

[CS:GO] SteamID Only

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Junior Member
Join Date: Feb 2017
Old 04-07-2021 , 17:44   [CS:GO] SteamID Only
Reply With Quote #1

Is there a way to make so that this plugins works for only a steamid set in the code and not for the admin flag?

new Handle:cvar_sv_cheats;
new bool:bool_sv_cheats;

public OnPluginStart()
    cvar_sv_cheats = FindConVar("sv_cheats");
    if(cvar_sv_cheats == INVALID_HANDLE)
        SetFailState("Cvar sv_cheats not exist!");
    HookConVarChange(cvar_sv_cheats, convarchanged);

public convarchanged(Handle:cvar, const String:oldValue[], const String:newValue[])
    bool_sv_cheats = GetConVarBool(cvar_sv_cheats);
    CreateTimer(0.1, delayed, _, TIMER_FLAG_NO_MAPCHANGE);

public Action:delayed(Handle:timer)
    for(new i = 1; i <= MaxClients; i++)

public OnClientPostAdminCheck(client)
    if(bool_sv_cheats || IsFakeClient(client))

    if(CheckCommandAccess(client, "sm_sv_cheats_enable", ADMFLAG_ROOT) && SendConVarValue(client, cvar_sv_cheats, "1"))
        PrintToConsole(client, "\n\n\n      sm_sv_cheats_enable = ACCESS GRANTED!\n     sv_cheats enabled!!\n\n\n");

Last edited by DarkDeviL; 04-08-2021 at 09:56. Reason: Restore to previous version.
knc191 is offline
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-08-2021 , 02:20   Re: [CS:GO] SteamID Only
Reply With Quote #2


But it's not hard to set work only for one person from admin configuration.

Unless you have evil plans to spread your plugins to others.
Bacardi is offline

Thread Tools
Display Modes

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 05:16.

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