amxmodx/plugins/include/jghg2.inc

172 lines
2.9 KiB
PHP
Raw Normal View History

2004-03-24 05:01:33 +00:00
// JGHG2 module
//This file is provided for backwards compatibility.
//It includes the engine and cstrike modules automatically.
//It is intended for AMX Mod X
2004-03-24 08:18:07 +00:00
#if !defined INCLUDED_JGHG
#define INCLUDED_JGHG
2004-03-24 05:01:33 +00:00
#include <engine>
#include <cstrike>
2004-03-24 08:18:07 +00:00
#if !defined _jghg_enums
#define _jghg_enums
2004-03-24 05:01:33 +00:00
// Global member variables
enum {
// Edict
GL_trace_ent = 0,
// Float
GL_coop,
GL_deathmatch,
GL_force_retouch,
GL_found_secrets,
GL_frametime,
GL_serverflags,
GL_teamplay,
GL_time,
GL_trace_allsolid,
GL_trace_fraction,
GL_trace_inopen,
GL_trace_inwater,
GL_trace_plane_dist,
GL_trace_startsolid,
// Int
GL_cdAudioTrack,
GL_maxClients,
GL_maxEntities,
GL_msg_entity,
GL_trace_flags,
GL_trace_hitgroup,
// String
GL_pStringBase,
GL_mapname,
GL_startspot,
// Vector
GL_trace_endpos,
GL_trace_plane_normal,
GL_v_forward,
GL_v_right,
GL_v_up,
GL_vecLandmarkOffset,
// Void (not supported)
GL_pSaveData
}
// jghg_categories
2004-03-24 08:18:07 +00:00
enum {
jghg2_classname = 0,
jghg2_target = 1,
jghg2_targetname = 2
2004-03-24 05:01:33 +00:00
}
2004-03-24 08:18:07 +00:00
#endif
2004-03-24 05:01:33 +00:00
stock jghg_find_ent_owner(start_from_ent, jghg_category, value[], owner_index)
{
find_ent_by_owner(start_from_ent, value[], owner_index, jghg_category)
}
stock find_ent_sphere(start_from_ent, Float:origin[3], Float:radius)
{
2004-03-24 08:18:07 +00:00
return find_ent_in_sphere(start_from_ent, origin, radius)
2004-03-24 05:01:33 +00:00
}
stock get_hostage_id(hostage)
{
return cs_get_hostage_id(hostage)
}
stock get_owner(id)
{
return entity_get_edict(id, EV_ENT_owner)
}
stock get_pdata(entity, offset)
{
2004-03-24 08:18:07 +00:00
return get_offset(entity, offset)
2004-03-24 05:01:33 +00:00
}
stock Float:get_pdata_float(entity, offset)
{
return get_offset_float(entity, offset)
}
stock get_pdata_char(entity, offset)
{
return get_offset_char(entity, offset)
}
2004-03-24 08:18:07 +00:00
stock get_pdata_short(entity, offset)
2004-03-24 05:01:33 +00:00
{
return get_offset_short(entity, offset)
}
stock set_pdata(entity, offset, value)
{
return set_offset(entity, offset, value)
}
stock set_pdata_float(entity, offset, Float:value)
{
return set_offset_float(entity, offset, value)
}
stock set_pdata_char(entity, offset, value)
{
return set_offset_char(entity, offset, value)
}
stock set_pdata_short(entity, offset, value)
{
return set_offset_short(entity, offset, value)
}
stock is_ent_valid(id)
{
return is_valid_ent(id)
}
stock number_of_entities()
{
return entity_count()
}
stock use(used, user)
{
return force_use(user, used)
}
stock Float:globals_get_float(variable)
{
2004-03-24 08:18:07 +00:00
return get_global_float(variable)
2004-03-24 05:01:33 +00:00
}
stock globals_get_int(variable)
{
2004-03-24 08:18:07 +00:00
return get_global_int(variable)
2004-03-24 05:01:33 +00:00
}
stock globals_get_string(variable, string[], maxlen)
{
2004-03-24 08:18:07 +00:00
return get_global_string(variable, string, maxlen)
2004-03-24 05:01:33 +00:00
}
stock globals_get_vector(variable, Float:vector[3])
{
2004-03-24 08:18:07 +00:00
return get_global_vector(variable, vector)
2004-03-24 05:01:33 +00:00
}
stock globals_get_edict(variable)
{
2004-03-24 08:18:07 +00:00
return get_global_edict(variable)
2004-03-24 05:01:33 +00:00
}
stock get_max_entities() {
return get_global_int(GL_maxEntities)
}
stock jghg2_set_size(index, Float:mins[3], Float:maxs[3])
{
return set_size(index, mins, maxs)
}
stock jghg2_think(index)
{
return call_think(index)
}
#endif // INCLUDED_JGHG