Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions reapi/extra/amxmodx/scripting/include/reapi_gamedll.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1221,3 +1221,155 @@ native rg_player_relationship(const player, const target);
* @noreturn
*/
native rg_send_death_message(const pKiller, const pVictim, const pAssister, const pevInflictor, const killerWeaponName[], const DeathMessageFlags:iDeathMessageFlags, const KillRarity:iRarityOfKill);

/*
* 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 a specified number of entities matching the given classname.
*
* @param classname Classname to search for
* @param removeCount Remove count
*
* @noreturn
*/
native rg_remove_other(const classname[], const removeCount);

/*
* Generates a random long integer within a specified range.
*
* @param seed Seed
* @param low Low
* @param high High
*
* @return -
*/
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 -
*/
native Float:rg_shared_random_float(const seed, const Float:low, const Float:high);

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

/*
* Unsets the group trace mask.
*
* @noreturn
*/
native rg_unset_group_trace();

/*
* Creates a screen shake effect.
*
* @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, const alpha, const flags);

/*
* Gets the water level at a specific position.
*
* @param position Entity index
* @param minz Min Z
* @param maxz Max Z
*
* @return -
*/
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 27
#define REGAMEDLL_API_VERSION_MINOR 31

// CBasePlayer::Spawn hook
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
Expand Down Expand Up @@ -818,6 +818,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
Loading