Skip to content
17 changes: 17 additions & 0 deletions reapi/extra/amxmodx/scripting/include/cssdk_const.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1585,3 +1585,20 @@ enum KillRarity
KILLRARITY_REVENGE = 0x100, // Revenge by the killer
KILLRARITY_INAIR = 0x200 // Killer was in the air (skill to deal with high inaccuracy)
};

/**
* Texture types
*/
#define CHAR_TEX_CONCRETE 'C'
#define CHAR_TEX_METAL 'M'
#define CHAR_TEX_DIRT 'D'
#define CHAR_TEX_VENT 'V'
#define CHAR_TEX_GRATE 'G'
#define CHAR_TEX_TILE 'T'
#define CHAR_TEX_SLOSH 'S'
#define CHAR_TEX_WOOD 'W'
#define CHAR_TEX_COMPUTER 'P'
#define CHAR_TEX_GRASS 'X'
#define CHAR_TEX_GLASS 'Y'
#define CHAR_TEX_FLESH 'F'
#define CHAR_TEX_SNOW 'N'
151 changes: 151 additions & 0 deletions reapi/extra/amxmodx/scripting/include/reapi_gamedll.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1245,3 +1245,154 @@ native rg_send_death_message(const pKiller, const pVictim, const pAssister, cons
* @noreturn
*/
native rg_player_takedamage_impulse(const player, const attacker, const Float:flKnockbackForce, const Float:flVelModifier);

/*
* Restarts entities with the specified classname.
*
* @param classname Classname to search for
*
* @noreturn
*/
native rg_restart_other(const classname[]);

/*
* Resets all entities to their original state.
*
* @noreturn
*/
native rg_reset_entities();

/*
* Removes entities matching the given classname, optionally limited to a specified number of entities.
*
* @param classname Classname to search for
* @param removeCount Remove count
*
* @noreturn
*/
native rg_remove_other(const classname[], const removeCount = 0);

/*
* Generates a random long integer within a specified range.
*
* @param seed Seed
* @param low Low
* @param high High
*
* @return A random long integer between "low" and "high" (inclusive)
*/
native rg_shared_random_long(const seed, const low, const high);

/*
* Generates a random float within a specified range.
*
* @param seed Seed
* @param low Low
* @param high High
*
* @return A random float between "low" and "high" (inclusive)
*/
native Float:rg_shared_random_float(const seed, const Float:low, const Float:high);

/*
* Sets the group trace mask and operation.
*
* @param groupmask Group Mask
* @param op Operation
*
* @noreturn
*/
native rg_set_group_trace(const groupmask, const op);

/*
* Resets the group trace mask to its default state.
*
* @noreturn
*/
native rg_unset_group_trace();

/*
* Creates a screen shake effect for players within a specified radius.
*
* @param vecCenter Center
* @param amplitude Amplitude
* @param frequency Frequency
* @param duration Duration
* @param radius Radius
*
* @noreturn
*/
native rg_screen_shake(Float:vecCenter[3], const Float:amplitude, const Float:frequency, const Float:duration, const Float:radius);

/*
* Fades the screen for all players.
*
* @param vecColor Color
* @param fadeTime Fade Time
* @param fadeHold Fade Hold
* @param alpha Alpha
* @param flags Flags
*
* @noreturn
*/
native rg_screen_fade_all(Float:vecColor[3], const Float:fadeTime, const Float:fadeHold, const alpha, const flags);

/*
* Fades the screen for a specific player.
*
* @param index Client index
* @param vecColor Color
* @param fadeTime Fade Time
* @param fadeHold Fade Hold
* @param alpha Alpha
* @param flags Flags
*
* @noreturn
*/
native rg_screen_fade(const index, Float:vecColor[3], const Float:fadeTime, const Float:fadeHold = 0.0, const alpha = 0, const flags = 0);

/*
* Gets the water level at a specific position.
*
* @param position Entity index
* @param minz Min Z
* @param maxz Max Z
*
* @return The Z coordinate of the water surface
*/
native Float:rg_water_level(Float:position[3], const Float:minz, const Float:maxz);

/*
* Creates bubbles within a specified area.
*
* @param vecMins Mins
* @param vecMaxs Maxs
* @param bubbleCount Bubble Count
*
* @noreturn
*/
native rg_bubbles(Float:vecMins[3], Float:vecMaxs[3], const bubbleCount);

/*
* Creates a trail of bubbles between two points.
*
* @param from Start position
* @param to End position
* @param bubbleCount Bubble Count
*
* @noreturn
*/
native rg_bubble_trail(Float:from[3], Float:to[3], const bubbleCount);

/*
* Retrieves the texture type hit by a traceresult, based on start and end positions.
*
* @param ptr Traceresult pointer, use Fakemeta's create_tr2 to instantiate one
* @param vecSrc Start position
* @param vecEnd End position
* @param output Buffer to copy the texture type
* @param len Maximum buffer size
*
* @noreturn
*/
native rg_texture_hit(const ptr, Float:vecSrc[3], Float:vecEnd[3], output[], len);
14 changes: 13 additions & 1 deletion reapi/include/cssdk/dlls/regamedll_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <API/CSInterfaces.h>

#define REGAMEDLL_API_VERSION_MAJOR 5
#define REGAMEDLL_API_VERSION_MINOR 30
#define REGAMEDLL_API_VERSION_MINOR 31

// CBasePlayer::Spawn hook
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
Expand Down Expand Up @@ -828,6 +828,18 @@ struct ReGameFuncs_t {
void (*TextureTypePlaySound)(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int iBulletType);
class CWeaponBox *(*CreateWeaponBox)(CBasePlayerItem *pItem, CBasePlayer *pPlayerOwner, const char *modelName, Vector &origin, Vector &angles, Vector &velocity, float lifeTime, bool packAmmo);
class CGrenade *(*SpawnGrenade)(WeaponIdType weaponId, entvars_t *pevOwner, Vector &vecSrc, Vector &vecThrow, float time, int iTeam, unsigned short usEvent);
int (*UTIL_SharedRandomLong)(unsigned int seed, int low, int high);
float (*UTIL_SharedRandomFloat)(unsigned int seed, float low, float high);
void (*UTIL_SetGroupTrace)(int groupmask, int op);
void (*UTIL_UnsetGroupTrace)();
int (*UTIL_EntitiesInBox)(CBaseEntity **pList, int listMax, const Vector &mins, const Vector &maxs, int flagMask);
void (*UTIL_ScreenShake)(const Vector &center, float amplitude, float frequency, float duration, float radius);
void (*UTIL_ScreenFadeAll)(const Vector &color, float fadeTime, float fadeHold, int alpha, int flags);
void (*UTIL_ScreenFade)(CBaseEntity *pEntity, const Vector &color, float fadeTime, float fadeHold, int alpha, int flags);
float (*UTIL_WaterLevel)(const Vector &position, float minz, float maxz);
void (*UTIL_Bubbles)(Vector mins, Vector maxs, int count);
void (*UTIL_BubbleTrail)(Vector from, Vector to, int count);
char (*UTIL_TextureHit)(TraceResult *ptr, Vector vecSrc, Vector vecEnd);
};

class IReGameApi {
Expand Down
Loading