Raised This Month: $ Target: $400
 0% 

Change server pass...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
stupok
Veteran Member
Join Date: Feb 2006
Old 07-11-2007 , 16:34   Re: Change server pass...
Reply With Quote #5

This should do it:

Code:
/* AMXMOD X script.
*
* (c) Copyright 2007 Qlim4X
* This file is provided as is (no warranties).
*
* For #Pro.Gather in GrNet. Internal use only.
*
*/

#include <amxmod>
#include <amxmisc>

#define MAX_PLAYERS 32

public plugin_init()
{
	register_plugin("pro.gather ChangePass", "1.0", "qlim4x")
	
	register_concmd("pro_pass", "set_password", ADMIN_BAN, "<password>")
	
	register_cvar("sm_password", "scrim", FCVAR_ARCHIVE|FCVAR_PROTECTED)
}


public set_password(id, level, cid)
{
	if(!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED
	
	new set_pass[32]
	read_argv(1, set_pass, 31)
	
	set_cvar_string("sv_password", set_pass )
	server_exec()
	
	for(new i = 1; i <= MAX_PLAYERS; i++)
	{
		if(is_user_admin(id))
		{
			client_print(id, print_chat, "* sv_password changed to ^"%s^"", set_pass)
		}
	}
	
	return PLUGIN_HANDLED
}
stupok is offline
 



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 21:27.


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