Quote:
Originally Posted by kp_uparrow
you can't just assign strings, u have to use format
|
minutes = "60";
You're wrong. You can do that for this case.
@Alka.
Don't hardcoding the ban time.
Code:
// -- Global
new cvar_maxbantime;
[...]
// -- In plugin_init()
cvar_maxbantime = register_cvar( "amx_maxbantime", "60" );
[...]
// -- In Ban Cmd, after reading args...
new cvar_maxbantime = get_pcvar_num( cvar_maxbantime );
if( !( get_user_flags( id ) & ADMIN_RCON ) && str_to_num( minutes ) > cvar_maxbantime )
{
copy( minutes, sizeof minutes - 1, num_to_str( cvar_maxbantime ) );
}
__________________