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

Applying for server password plugin [CSS]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.BL4ck k1lL3r_
Junior Member
Join Date: Feb 2017
Location: Iran
Old 06-22-2017 , 15:30   Applying for server password plugin [CSS]
Reply With Quote #1

Hi.

I Need a Script For Easy Change Server Password -By "sm_pw <Custom Password>"
.BL4ck k1lL3r_ is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-22-2017 , 16:42   Re: Applying for server password plugin [CSS]
Reply With Quote #2

Code:
sm_rcon sv_password "letmein"
Can't be any easier.

Since your title says "Applying", I moved your thread to Plugin/Gameplay Ideas and Requests.
In the Scripting section where you posted, you should provide the ode you want help with.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 06-22-2017 at 16:47.
DarkDeviL is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 07-02-2017 , 01:58   Re: Applying for server password plugin [CSS]
Reply With Quote #3

You can use this and enjoy

https://forums.alliedmods.net/showthread.php?t=232149

or with a simple code:

PHP Code:
#pragma semicolon 1 

#include <sourcemod> 

public OnPluginStart() 

    
RegAdminCmd("sm_pw"Command_SvPasswordADMFLAG_PASSWORD);


public 
Action:Command_SvPassword(clientargs

    
decl String:sPass[256];
    
GetCmdArg(1sPasssizeof(sPass));
    
ServerCommand("sv_password %s"sPass); 

WatchDogs is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 07-02-2017 , 17:15   Re: Applying for server password plugin [CSS]
Reply With Quote #4

Quote:
Originally Posted by WatchDogs View Post
You can use this and enjoy

https://forums.alliedmods.net/showthread.php?t=232149

or with a simple code:

PHP Code:
#pragma semicolon 1 

#include <sourcemod> 

public OnPluginStart() 

    
RegAdminCmd("sm_pw"Command_SvPasswordADMFLAG_PASSWORD);


public 
Action:Command_SvPassword(clientargs

    
decl String:sPass[256];
    
GetCmdArg(1sPasssizeof(sPass));
    
ServerCommand("sv_password %s"sPass); 

Coding in the old syntax hurts me.

I'll rewrite this into new syntax later today cuz why not.
cigzag is offline
sdz
Senior Member
Join Date: Feb 2012
Old 07-02-2017 , 17:50   Re: Applying for server password plugin [CSS]
Reply With Quote #5

Quote:
Originally Posted by SnowTigerVidz View Post
Coding in the old syntax hurts me.

I'll rewrite this into new syntax later today cuz why not.
Barely any difference and this took 8 seconds to convert

PHP Code:
#include <sourcemod> 

public void OnPluginStart() 

    
RegAdminCmd("sm_pw"Command_SvPasswordADMFLAG_PASSWORD);


public 
Action Command_SvPassword(int clientint args

    
char sPass[256];
    
GetCmdArg(1sPasssizeof(sPass));
    
ServerCommand("sv_password %s"sPass); 


Last edited by sdz; 07-02-2017 at 17:50.
sdz is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 07-03-2017 , 02:13   Re: Applying for server password plugin [CSS]
Reply With Quote #6

I wrote it in old syntax because he maybe doesn't use the last version of Sourcemod.

Anyway new syntax is very better but old syntax works on all versions.

Thanks all.
WatchDogs 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 23:24.


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