mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 22:35:37 +03:00
Added request at29487
1) New hookable Engine func: GetInfoKeyBuffer 2) New GameDLL func that can be called via engfunc: GetInfoKeyBuffer 3) New native: copy_infokey_buffer that copies data out of the specified info key buffer 4) EngFunc_InfoKeyValue, EngFunc_SetKeyValue, and EngFunc_SetClientKeyValue have been reworked so that they expect pointers to an info key buffer in order to work properly o_O
This commit is contained in:
parent
b12025093b
commit
c6e8a356ee
@ -9,14 +9,7 @@
|
||||
|
||||
#include <fakemeta_const>
|
||||
|
||||
#if AMXX_VERSION_NUM >= 175
|
||||
#pragma reqlib fakemeta
|
||||
#if !defined AMXMODX_NOAUTOLOAD
|
||||
#pragma loadlib fakemeta
|
||||
#endif
|
||||
#else
|
||||
#pragma library fakemeta
|
||||
#endif
|
||||
|
||||
/* Returns entvar data from an entity Use the pev_* enum to specify which form of data you want returned. */
|
||||
native pev(_index,_value,{Float,Sql,Result,_}:...);
|
||||
@ -124,3 +117,7 @@ native get_pdata_string(entity, offset, dest[], maxlength, byref=1, linux=-5);
|
||||
//realloc = 1 - reallocate new string with free+malloc
|
||||
//realloc = 2 - reallocate new string with delete[]+new[]
|
||||
native set_pdata_string(entity, offset, const source[], realloc=2, linux=-5);
|
||||
|
||||
// Copies the given infoBuffer pointer into out[]
|
||||
// An infoBuffer pointer is returned by EngFunc_GetInfoKeyBuffer
|
||||
native copy_infokey_buffer(infoBuffer, out[], maxlen);
|
||||
|
@ -20,6 +20,9 @@
|
||||
#define FMRES_IGNORED 1
|
||||
#define FMRES_OVERRIDE 3
|
||||
|
||||
// Use this with GetInfoKeyBuffer if you want the server's localinfo buffer
|
||||
#define FM_NULLENT -1
|
||||
|
||||
|
||||
/* Used with engfunc()
|
||||
*/
|
||||
@ -105,7 +108,8 @@ enum {
|
||||
EngFunc_InfoKeyValue, // char*) (char *infobuffer, char *key);
|
||||
EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
||||
EngFunc_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||
EngFunc_CreateInstBaseline // int ) (int classname, struct entity_state_s *baseline);
|
||||
EngFunc_CreateInstBaseline, // int ) (int classname, struct entity_state_s *baseline);
|
||||
EngFunc_GetInfoKeyBuffer // char*) (edict_t *e);
|
||||
};
|
||||
|
||||
/* Used with dllfunc()
|
||||
@ -513,14 +517,16 @@ enum {
|
||||
FM_ShouldCollide,
|
||||
|
||||
//LATE ADDITIONS (v1.71)
|
||||
FM_ClientUserInfoChanged, //passes id only
|
||||
FM_ClientUserInfoChanged,
|
||||
|
||||
// LATE ADDITIONS (v1.75)
|
||||
FM_UpdateClientData,
|
||||
FM_AddToFullPack,
|
||||
FM_CmdStart,
|
||||
FM_CmdEnd,
|
||||
FM_CreateInstBaseline,
|
||||
FM_CreateBaseline
|
||||
FM_CreateBaseline,
|
||||
FM_GetInfoKeyBuffer
|
||||
};
|
||||
|
||||
enum TraceResult
|
||||
|
@ -175,16 +175,18 @@ stock EF_WriteCoord(Float:value)
|
||||
return engfunc(EngFunc_WriteCoord, value)
|
||||
stock EF_WriteAngle(Float:value)
|
||||
return engfunc(EngFunc_WriteAngle, value)
|
||||
stock EF_InfoKeyValue(const CLIENT, const KEY[], returnValue[], maxLength)
|
||||
return engfunc(EngFunc_InfoKeyValue, CLIENT, KEY, returnValue, maxLength)
|
||||
stock EF_SetKeyValue(const BUFFER[], const KEY[], const VALUE[])
|
||||
return engfunc(EngFunc_SetKeyValue, BUFFER, KEY, VALUE)
|
||||
stock EF_InfoKeyValue(const INFOBUFFER, const KEY[], returnValue[], maxLength)
|
||||
return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength)
|
||||
stock EF_SetKeyValue(const INFOBUFFER, const KEY[], const VALUE[])
|
||||
return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE)
|
||||
|
||||
stock EF_SetClientKeyValue(const ID, const KEY[], const VALUE[])
|
||||
return engfunc(EngFunc_SetClientKeyValue, ID, KEY, VALUE)
|
||||
stock EF_SetClientKeyValue(const ID, const INFOBUFFER, const KEY[], const VALUE[])
|
||||
return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE)
|
||||
|
||||
stock EF_CreateInstBaseline(CLASSNAME, baseline)
|
||||
return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline)
|
||||
stock EF_GetInfoKeyBuffer(const ENTITY)
|
||||
return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY)
|
||||
|
||||
// DLLFuncs
|
||||
stock DF_GameInit()
|
||||
|
Loading…
Reference in New Issue
Block a user