diff --git a/plugins/include/fakemeta.inc b/plugins/include/fakemeta.inc index b34f57bf..dce96487 100755 --- a/plugins/include/fakemeta.inc +++ b/plugins/include/fakemeta.inc @@ -22,6 +22,9 @@ native set_pev(_index,_value,{Float,Sql,Result,_}:...); */ native pev_valid(entindex); +/* Returns any global variable inside globalvars_t structure. Use the glb_* enum. */ +native global_get(_value, {Float,Sql,Result,_}:...); + /* Returns an integer from private data. _linuxdiff is added into the _Offset if it's used on a linux server. */ native get_pdata_int(_index,_Offset,_linuxdiff=5); diff --git a/plugins/include/fakemeta_const.inc b/plugins/include/fakemeta_const.inc index f466dbba..77a55257 100755 --- a/plugins/include/fakemeta_const.inc +++ b/plugins/include/fakemeta_const.inc @@ -300,6 +300,54 @@ enum { pev_vecarray_end }; +/* Used with get_global() + */ +enum +{ + glb_start_int = 0, + glb_trace_hitgroup, + glb_trace_flags, + glb_msg_entity, + glb_cdAudioTrack, + glb_maxClients, + glb_maxEntities, + glb_end_int, + glb_start_float, + glb_time, + glb_frametime, + glb_force_retouch, + glb_deathmatch, + glb_coop, + glb_teamplay, + glb_serverflags, + glb_found_secrets, + glb_trace_allsolid, + glb_trace_startsolid, + glb_trace_fraction, + glb_trace_plane_dist, + glb_trace_inopen, + glb_trace_inwater, + glb_end_float, + glb_start_edict, + glb_trace_ent, + glb_end_edict, + glb_start_vector, + glb_v_forward, + glb_v_up, + glb_v_right, + glb_trace_endpos, + glb_trace_plane_normal, + glb_vecLandmarkOffset, + glb_end_vector, + glb_start_string, + glb_mapname, + glb_startspot, + glb_end_string, + glb_start_pchar, + glb_pStringBase, + glb_end_pchar +}; + /* Used with register_forward() */ enum {