request at29928
New callable engine function: AlertMessage
This commit is contained in:
@ -52,7 +52,7 @@ enum
|
||||
DLLFunc_pfnAllowLagCompensation, // int ) ( void );
|
||||
// I know this does not fit with DLLFUNC(), but I don't want another native just for it.
|
||||
MetaFunc_CallGameEntity, // bool ) (plid_t plid, const char *entStr,entvars_t *pev);
|
||||
DLLFunc_ClientUserInfoChanged, // void ) (idplayer)
|
||||
DLLFunc_ClientUserInfoChanged, // void ) (edict *pEntity, char *infobuffer);
|
||||
// You can pass in 0 for global client data handle or another client data handle here
|
||||
DLLFunc_UpdateClientData, // void ) (const struct edict_s *ent, int sendweapons, struct clientdata_s *cd);
|
||||
// You can pass in 0 for global entity state handle or another entity state handle here
|
||||
|
@ -1054,6 +1054,13 @@ static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
|
||||
|
||||
temp = (*g_engfuncs.pfnGetInfoKeyBuffer)((index == -1) ? NULL : INDEXENT2(index));
|
||||
return reinterpret_cast<cell>(temp);
|
||||
case EngFunc_AlertMessage: // void ) (ALERT_TYPE atype, char *szFmt, ...);
|
||||
cRet = MF_GetAmxAddr(amx, params[2]);
|
||||
iparam1 = cRet[0];
|
||||
temp = MF_FormatAmxString(amx, params, 3, &len);
|
||||
|
||||
(*g_engfuncs.pfnAlertMessage)(static_cast<ALERT_TYPE>(iparam1), temp);
|
||||
return 1;
|
||||
default:
|
||||
MF_LogError(amx, AMX_ERR_NATIVE, "Unknown engfunc type %d", type);
|
||||
return 0;
|
||||
|
@ -79,7 +79,8 @@ enum {
|
||||
EngFunc_SetKeyValue, // void ) (char *infobuffer, char *key, char *value);
|
||||
EngFunc_SetClientKeyValue, // void ) (int clientIndex, char *infobuffer, char *key, char *value);
|
||||
EngFunc_CreateInstancedBaseline, // int ) (int classname, struct entity_state_s *baseline);
|
||||
EngFunc_GetInfoKeyBuffer // char*) (edict_t *e);
|
||||
EngFunc_GetInfoKeyBuffer, // char*) (edict_t *e);
|
||||
EngFunc_AlertMessage // void ) (ALERT_TYPE atype, char *szFmt, ...);
|
||||
};
|
||||
|
||||
#endif //_ENGFUNC_INCLUDE_H
|
||||
|
Reference in New Issue
Block a user