Raised This Month: $ Target: $400
 0% 

Solved Password


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mohxer
New Member
Join Date: Jan 2018
Old 01-07-2018 , 02:10   Password
Reply With Quote #1

Hi can anyone give me a command shorcut code for css that change sv password with "!pw 12"
mohxer is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 01-07-2018 , 08:04   Re: Password
Reply With Quote #2

the topic is marked as solved, but no solution here.

So here is a quick write

PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
RegAdminCmd("sm_password"Command_PassADMFLAG_BAN);
    
RegAdminCmd("sm_pw"Command_PassADMFLAG_BAN);
    
RegAdminCmd("sm_removepw"Command_NoPassADMFLAG_BAN);
}

public 
Action Command_Pass(int clientint args)
{
    if (
args 1)
    {
        
ReplyToCommand(client"Usage: sm_password <password>");

        return 
Plugin_Handled;
    }

    
char sBuffer[32];
    
GetCmdArg(1sBuffersizeof(sBuffer));

    
ServerCommand("sv_password %s"sBuffer);
    
PrintToChatAll("Server has been locked with password.");

    return 
Plugin_Handled;
}

public 
Action Command_NoPass(int clientint args)
{
    
ServerCommand("sv_password \"\"");
    
PrintToChatAll("Server has been unlocked. (no password)");

    return 
Plugin_Handled;

Attached Files
File Type: sp Get Plugin or Get Source (password.sp - 279 views - 779 Bytes)
__________________
coding & free software

Last edited by shanapu; 01-07-2018 at 08:05.
shanapu 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 03:43.


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