hi again
i want to make a script that can change the server password adn only other admins can see the pass and not the users
my admins dont have rcon access so they use amx_cvar sv_password and all the players can see the pass
so i need to creat a script that can change the pass just typing in the console pro_pass mypass
any ideas????
thx
this is my try but have problem when press to time the same password
Quote:
/* 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>
public plugin_init()
{
register_plugin("pro.gather ChangePass","1.0","qlim4x")
register_concmd("pro_pass","set_password",ADM IN_BAN,"<password>")
register_cvar("sm_password","scrim",FCVAR_ARC HIVE|FCVAR_PROTECTED)
return PLUGIN_CONTINUE
}
public set_password(id, level, cid)
{
if(!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED
new set_pass[32]
read_argv ( id, set_pass, 31 )
set_cvar_string ( "sv_password", set_pass )
return PLUGIN_HANDLED
}
|