/*---------------------------------------------*\ EXPERIMENTAL SWITCH STATEMENT :D \*---------------------------------------------*/ /* required table design local t = { { ["condition"] = "a", ["code"] = "Msg( "AYY" )" }, { ["condition"] = "b", ["code"] = "Msg( "NEWFAGS" ) } } */ Msg("--> (SWITCH INSTALLED) <--\n") function switch( arg, tab ) for i = 1, #tab do if( arg == tab[i]["condition"] ) then RunString( tab[i]["code"] ) end end end local t = { { condition = "a", code = "MsgN( \"AYY\" )" }, { condition = "b", code = "MsgN( \"NEWFAGS\" )" } } function lol(...) switch( "b", t ) end concommand.Add("call_switch", lol)