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
}