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

Esay Set,Remove,Find Password


Post New Thread Reply   
 
Thread Tools Display Modes
Author
EzEnDLeSs
New Member
Join Date: Sep 2019
Plugin ID:
6867
Plugin Version:
0.85
Plugin Category:
Admin Commands
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin Easy Set Password Remove Password Adn Fine Password.
    Unapprover:
    Reason for Unapproving:
    No source code provided
    Old 12-23-2019 , 05:31   Esay Set,Remove,Find Password
    Reply With Quote #1

    This Plugin By EZU
    Attached Files
    File Type: smx Password.smx (5.8 KB, 153 views)
    EzEnDLeSs is offline
    Cruze
    Veteran Member
    Join Date: May 2017
    Old 12-24-2019 , 10:53   Re: Esay Set,Remove,Find Password
    Reply With Quote #2

    PHP Code:
    #include <sourcmod>

    #pragma semicolon 1 
    #pragma newdecls required 

    char g_szSvPassword[128];

    public 
    Plugin myinfo =

        
    name "[ShirazCs] Password (!pw,!rpw,!npw,!fpw Find Password)",
        
    description "Set Server Password",
        
    author "<<-E Z U->>",
        
    version "1.0",
        
    url "t.me/ShirazCs"
    }

    public 
    void OnPluginStart()
    {
        
    RegAdminCmd("sm_pw"CommandPasswordADMFLAG_ROOT"Set Server Password");
        
    RegAdminCmd("sm_rpw"CommandRemovePasswordADMFLAG_ROOT"Remove Server Password");
        
    RegAdminCmd("sm_npw"CommandRemovePasswordADMFLAG_ROOT"Remove Server Password");
        
    RegAdminCmd("sm_fpw"CommandFindPasswordADMFLAG_ROOT"Find Server Password");
        
    ConVar g_hCVsv_password FindConVar("sv_password");
        
    GetConVarString(g_hCVsv_passwordg_szSvPassword128);
        
    HookConVarChange(g_hCVsv_passwordConVar_OnChangeserverPassword);
        
    delete g_hCVsv_password;
    }

    public 
    int ConVar_OnChangeserverPassword(ConVar cvarchar[] oldValuechar[] newValue)
    {
        
    GetConVarString(cvarg_szSvPassword128);
        return 
    0;
    }

    public 
    Action CommandFindPassword(int clientint args)
    {
        
    char szClientName[32];
        
    GetClientName(clientszClientName32);
        
    char sDate[64];
        
    FormatTime(sDate64"%Y-%m-%d", -1);
        
    char sTime[64];
        
    FormatTime(sTime64"%H:%M:%S", -1);
        
    char zefile[256];
        
    BuildPath(Path_SMzefile256"logs/Password_%s.ini"sDate);
        
    PrintHintTextToAll("[ShirazCs] Server Password [%s]"g_szSvPassword);
        
    PrintToChatAll("[SM] Server Password : %s \x01[%s]"g_szSvPasswordsTime);
        
    LogToFile(zefile"Admin [%s] Find Server Password in [ %s - %s ]"szClientNamesDatesTime);
        return 
    Plugin_Handled;
    }

    public 
    Action CommandRemovePassword(int clientint args)
    {
        
    char szClientName[32];
        
    GetClientName(clientszClientName32);
        
    char sDate[64];
        
    FormatTime(sDate64"%Y-%m-%d", -1);
        
    char sTime[64];
        
    FormatTime(sTime64"%H:%M:%S", -1);
        
    char zefile[256];
        
    BuildPath(Path_SMzefile256"logs/Password_%s.ini"sDate);
        
    ServerCommand("sm_cvar sv_password none");
        
    PrintToChatAll("[SM] Removed Server Password \x01[%s]"sTime);
        
    LogToFile(zefile"Admin [%s] Removed Server Password in [ %s - %s ]"szClientNamesDatesTime);
        return 
    Plugin_Handled;
    }

    public 
    Action CommandPassword(int clientint args)
    {
        
    char Pass[256];
        
    GetCmdArg(1Pass256);
        
    char szClientName[32];
        
    GetClientName(clientszClientName32);
        
    char sDate[64];
        
    FormatTime(sDate64"%Y-%m-%d", -1);
        
    char sTime[64];
        
    FormatTime(sTime64"%H:%M:%S", -1);
        
    char zefile[256];
        
    BuildPath(Path_SMzefile256"logs/Password_%s.ini"sDate);
        if (
    StrEqual(Pass""true))
        {
            
    ServerCommand("sm_cvar sv_password none");
            
    PrintToChatAll("[SM] Removed Server Password \x01[%s]"sTime);
            
    LogToFile(zefile"Admin [%s] Removed Server Password in [ %s - %s ]"szClientNamesDatesTime);
        }
        else
        {
            
    ServerCommand("sm_cvar sv_password %s"Pass);
            
    PrintToChatAll("[SM] %s Set Server Password To : %s \x01[%s]"szClientNamePasssTime);
            
    PrintHintTextToAll("[ShirazCs] Server Password [%s]"Pass);
            
    LogToFile(zefile"Admin [%s] Set Server Password To : %s [ %s - %s ]"szClientNamePasssDatesTime);
        }
        return 
    Plugin_Handled;

    Decompiled plugin if anyone needs it.
    Untested.
    __________________
    Taking paid private requests! Contact me
    Cruze 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:44.


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