AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Applying for server password plugin [CSS] (https://forums.alliedmods.net/showthread.php?t=298788)

.BL4ck k1lL3r_ 06-22-2017 15:30

Applying for server password plugin [CSS]
 
Hi.

I Need a Script For Easy Change Server Password -By "sm_pw <Custom Password>" :)

DarkDeviL 06-22-2017 16:42

Re: Applying for server password plugin [CSS]
 
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.

WatchDogs 07-02-2017 01:58

Re: Applying for server password plugin [CSS]
 
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); 



cigzag 07-02-2017 17:15

Re: Applying for server password plugin [CSS]
 
Quote:

Originally Posted by WatchDogs (Post 2532926)
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.

sdz 07-02-2017 17:50

Re: Applying for server password plugin [CSS]
 
Quote:

Originally Posted by SnowTigerVidz (Post 2533039)
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); 



WatchDogs 07-03-2017 02:13

Re: Applying for server password plugin [CSS]
 
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.


All times are GMT -4. The time now is 17:02.

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