// get_cvar_ifloat( "cvar_param_float", "1.1" )
stock Float:get_cvar_ifloat( key[], value[] )
{
static t_cvar
t_cvar = register_cvar( key, value )
return get_pcvar_float( t_cvar )
}
// get_cvar_iint( "cvar_param_int", "1" )
stock get_cvar_iint( key[], value[] )
{
static t_cvar
t_cvar = register_cvar( key, value )
return get_pcvar_num( t_cvar )
}
// get_cvar_iflags( "cvar_param_flags", "ace" )
// or
// get_cvar_iflags( "cvar_param_flags", "all" )
stock get_cvar_iflags( key[], value[] )
{
static t_cvar, tszcvar[25]
t_cvar = register_cvar( key, value )
get_pcvar_string(t_cvar,tszcvar,charsmax(tszcvar))
return ( ( equal(tszcvar, "all") ) ? ADMIN_ALL : read_flags(tszcvar) )
}
// get_cvar_ibool( "cvar_param_bool", "1" )
stock bool:get_cvar_ibool( key[], value[] )
{
static t_cvar
t_cvar = register_cvar( key, value )
return bool:( get_pcvar_num( t_cvar ) )
}
// get_cvar_isplit( "cvar_param_split", "240.0 43 0" )
stock get_cvar_isplit( key[], value[], wtype )
{
static t_cvar, tszcvar[25], values[3][8]
t_cvar = register_cvar( key, value )
get_pcvar_string(t_cvar,tszcvar,charsmax(tszcvar))
parse( tszcvar, values[0], 7, values[1], 7, values[2], 7 )
new Float:param1 = str_to_float( values[0] )
new param2 = str_to_num( values[1] )
new bool:param3 = bool(str_to_num( values[1] ))
return true
}