Merge pull request #222 from xPaw/spcomp2-compat

Make include files a little more spcomp2 compatible
This commit is contained in:
Vincent Herbet 2015-03-11 14:48:59 +01:00
commit 24480a3782
11 changed files with 307 additions and 152 deletions

View File

@ -478,7 +478,7 @@ native cs_set_user_plant(index, plant = 1, showbombicon = 1);
* MaxClients, or the client is not connected, an error will be * MaxClients, or the client is not connected, an error will be
* thrown. * thrown.
*/ */
native cs_set_user_team(index, {CsTeams,_}:team, {CsInternalModel,_}:model = CS_DONTCHANGE); native cs_set_user_team(index, any:team, any:model = CS_DONTCHANGE);
/** /**
* Returns the client's team and optionally the model id. * Returns the client's team and optionally the model id.
@ -494,7 +494,7 @@ native cs_set_user_team(index, {CsTeams,_}:team, {CsInternalModel,_}:model = CS_
* MaxClients, or the client is not connected, an error will be * MaxClients, or the client is not connected, an error will be
* thrown. * thrown.
*/ */
native CsTeams:cs_get_user_team(index, &{CsInternalModel,_}:model = CS_DONTCHANGE); native CsTeams:cs_get_user_team(index, &any:model = CS_DONTCHANGE);
/** /**
* Returns if the client is a VIP. * Returns if the client is a VIP.

View File

@ -82,13 +82,13 @@ native dbi_nextrow(Result:_result);
* One extra param: returns Float: byref * One extra param: returns Float: byref
* Two extra param: Stores string with length * Two extra param: Stores string with length
*/ */
native dbi_field(Result:_result, _fieldnum, {Float,_}:... ); native dbi_field(Result:_result, _fieldnum, any:... );
/* Gets a field by name. Returns 0 on failure. /* Gets a field by name. Returns 0 on failure.
* One extra param: returns Float: byref * One extra param: returns Float: byref
* Two extra param: Stores string with length * Two extra param: Stores string with length
*/ */
native dbi_result(Result:_result, _field[], {Float,_}:... ); native dbi_result(Result:_result, _field[], any:... );
/* Returns the number of rows returned from a query /* Returns the number of rows returned from a query
*/ */

View File

@ -427,7 +427,7 @@ native forward_return(type,any:...);
* get_orig_retval(&Float:value) - retrieves float return value by reference * get_orig_retval(&Float:value) - retrieves float return value by reference
* get_orig_retval(value[], len) - retrives string return value * get_orig_retval(value[], len) - retrives string return value
*/ */
native get_orig_retval({Float,_}:...); native get_orig_retval(any:...);
native engfunc(type,any:...); native engfunc(type,any:...);
native dllfunc(type,any:...); native dllfunc(type,any:...);
@ -435,14 +435,14 @@ native dllfunc(type,any:...);
//only use this with functions that pass a Trace //only use this with functions that pass a Trace
// get: zero extra params - return int, one extra param = byref float or vector // get: zero extra params - return int, one extra param = byref float or vector
// set: use anything // set: use anything
native get_tr(TraceResult:tr_member, {Float,_}:...); native get_tr(TraceResult:tr_member, any:...);
native set_tr(TraceResult:tr_member, {Float,_}:...); native set_tr(TraceResult:tr_member, any:...);
//Upgraded version takes in a TraceResult handle, optionally passed in as the last parameter to the //Upgraded version takes in a TraceResult handle, optionally passed in as the last parameter to the
//TraceResult forward. Use 0 to specify the global traceresult handle set from calling //TraceResult forward. Use 0 to specify the global traceresult handle set from calling
// some of the Engfucs. // some of the Engfucs.
native get_tr2(tr_handle, {TraceResult,_}:tr_member, {Float,_}:...); native get_tr2(tr_handle, any:tr_member, any:...);
native set_tr2(tr_handle, {TraceResult,_}:tr_member, {Float,_}:...); native set_tr2(tr_handle, any:tr_member, any:...);
/** /**
* Creates a traceresult handle. This value should never be altered. * Creates a traceresult handle. This value should never be altered.
@ -466,33 +466,33 @@ native free_tr2(tr_handle);
//Same as above, use either a kvd_handle or 0 for global reserved kvd data //Same as above, use either a kvd_handle or 0 for global reserved kvd data
//kvd_handle is passed by the kvd hook, last param //kvd_handle is passed by the kvd hook, last param
native get_kvd(kvd_handle, KeyValueData:member, {Float,_}:...); native get_kvd(kvd_handle, KeyValueData:member, any:...);
//Using set_kvd with the handle from the hook for anything under KV_fHandled //Using set_kvd with the handle from the hook for anything under KV_fHandled
// is considered an undefined operation (it could crash). You should fire a new // is considered an undefined operation (it could crash). You should fire a new
// keyvalues structure rather than changing the internal engine strings. // keyvalues structure rather than changing the internal engine strings.
native set_kvd(kvd_handle, KeyValueData:member, {Float,_}:...); native set_kvd(kvd_handle, KeyValueData:member, any:...);
// These functions are used with the clientdata data structure (FM_UpdateClientData) // These functions are used with the clientdata data structure (FM_UpdateClientData)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector; 2 extra params - string and length // Get: 0 extra params - Return integer; 1 extra param - by ref float or vector; 2 extra params - string and length
// Set: Use anything // Set: Use anything
// Use 0 for cd_handle to specify the global clientdata handle // Use 0 for cd_handle to specify the global clientdata handle
native get_cd(cd_handle, ClientData:member, {Float,_}:...); native get_cd(cd_handle, ClientData:member, any:...);
native set_cd(cd_handle, ClientData:member, {Float,_}:...); native set_cd(cd_handle, ClientData:member, any:...);
// These functions are used with the entity_state data structure (FM_AddToFullPack) // These functions are used with the entity_state data structure (FM_AddToFullPack)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array // Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array
// Set: Use anything // Set: Use anything
// Use 0 for es_handle to specify the global entity_state handle // Use 0 for es_handle to specify the global entity_state handle
native get_es(es_handle, EntityState:member, {Float,_}:...); native get_es(es_handle, EntityState:member, any:...);
native set_es(es_handle, EntityState:member, {Float,_}:...); native set_es(es_handle, EntityState:member, any:...);
// These functions are used with the usercmd data structure (FM_CmdStart) // These functions are used with the usercmd data structure (FM_CmdStart)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector // Get: 0 extra params - Return integer; 1 extra param - by ref float or vector
// Set: Use anything // Set: Use anything
// Use 0 for uc_handle to specify the global usercmd handle // Use 0 for uc_handle to specify the global usercmd handle
native get_uc(uc_handle, UserCmd:member, {Float,_}:...); native get_uc(uc_handle, UserCmd:member, any:...);
native set_uc(uc_handle, UserCmd:member, {Float,_}:...); native set_uc(uc_handle, UserCmd:member, any:...);
//NOTE that for the string offsets below, on AMD64, a byref (char **) offset is NOT the same as an int offset //NOTE that for the string offsets below, on AMD64, a byref (char **) offset is NOT the same as an int offset
//In fact it's QWORD aligned rather than DWORD aligned, so the offset will be exactly half. //In fact it's QWORD aligned rather than DWORD aligned, so the offset will be exactly half.

View File

@ -21,261 +21,375 @@
#define _fakemeta_stocks_included #define _fakemeta_stocks_included
// EngFuncs // EngFuncs
stock EF_PrecacheModel(const string[]) stock EF_PrecacheModel(const string[]) {
return engfunc(EngFunc_PrecacheModel, string); return engfunc(EngFunc_PrecacheModel, string);
}
stock EF_PrecacheSound(const string[]) stock EF_PrecacheSound(const string[]) {
return engfunc(EngFunc_PrecacheSound, string); return engfunc(EngFunc_PrecacheSound, string);
stock EF_SetModel(const ID, const STRING[]) }
stock EF_SetModel(const ID, const STRING[]) {
return engfunc(EngFunc_SetModel, ID, STRING); return engfunc(EngFunc_SetModel, ID, STRING);
stock EF_ModelIndex(const STRING[]) }
stock EF_ModelIndex(const STRING[]) {
return engfunc(EngFunc_ModelIndex, STRING); return engfunc(EngFunc_ModelIndex, STRING);
stock EF_ModelFrames(modelIndex) }
stock EF_ModelFrames(modelIndex) {
return engfunc(EngFunc_ModelFrames, modelIndex); return engfunc(EngFunc_ModelFrames, modelIndex);
}
stock EF_SetSize(const ENTITY, const Float:MIN[3], const Float:MAX[3]) stock EF_SetSize(const ENTITY, const Float:MIN[3], const Float:MAX[3]) {
return engfunc(EngFunc_SetSize, ENTITY, MIN, MAX); return engfunc(EngFunc_SetSize, ENTITY, MIN, MAX);
stock EF_ChangeLevel(const S1[], const S2[]) }
stock EF_ChangeLevel(const S1[], const S2[]) {
return engfunc(EngFunc_ChangeLevel, S1, S2); return engfunc(EngFunc_ChangeLevel, S1, S2);
stock EF_VecToYaw(const Float:VECTOR[3], &Float:returnValue) }
stock EF_VecToYaw(const Float:VECTOR[3], &Float:returnValue) {
return engfunc(EngFunc_VecToYaw, VECTOR, returnValue); return engfunc(EngFunc_VecToYaw, VECTOR, returnValue);
stock EF_VecToAngles(const Float:VECTORIN[3], const Float:VECTOROUT[3]) }
stock EF_VecToAngles(const Float:VECTORIN[3], const Float:VECTOROUT[3]) {
return engfunc(EngFunc_VecToAngles, VECTORIN, VECTOROUT); return engfunc(EngFunc_VecToAngles, VECTORIN, VECTOROUT);
stock EF_MoveToOrigin(const ENTITY, const Float:GOAL[3], const Float:DISTANCE, const MOVETYPE) }
stock EF_MoveToOrigin(const ENTITY, const Float:GOAL[3], const Float:DISTANCE, const MOVETYPE) {
return engfunc(EngFunc_MoveToOrigin, ENTITY, GOAL, DISTANCE, MOVETYPE); return engfunc(EngFunc_MoveToOrigin, ENTITY, GOAL, DISTANCE, MOVETYPE);
}
stock EF_ChangeYaw(const ENTITY) stock EF_ChangeYaw(const ENTITY) {
return engfunc(EngFunc_ChangeYaw, ENTITY); return engfunc(EngFunc_ChangeYaw, ENTITY);
stock EF_ChangePitch(const ENTITY) }
stock EF_ChangePitch(const ENTITY) {
return engfunc(EngFunc_ChangePitch, ENTITY); return engfunc(EngFunc_ChangePitch, ENTITY);
stock EF_FindEntityByString(const STARTSEARCHAFTER, const FIELD[], const VALUE[]) }
stock EF_FindEntityByString(const STARTSEARCHAFTER, const FIELD[], const VALUE[]) {
return engfunc(EngFunc_FindEntityByString, STARTSEARCHAFTER, FIELD, VALUE); return engfunc(EngFunc_FindEntityByString, STARTSEARCHAFTER, FIELD, VALUE);
stock EF_GetEntityIllum(const ENTITY) }
stock EF_GetEntityIllum(const ENTITY) {
return engfunc(EngFunc_GetEntityIllum, ENTITY); return engfunc(EngFunc_GetEntityIllum, ENTITY);
stock EF_FindEntityInSphere(const STARTSEARCHAFTER, const Float:ORIGIN[3], Float:radius) }
stock EF_FindEntityInSphere(const STARTSEARCHAFTER, const Float:ORIGIN[3], Float:radius) {
return engfunc(EngFunc_FindEntityInSphere, STARTSEARCHAFTER, ORIGIN, radius); return engfunc(EngFunc_FindEntityInSphere, STARTSEARCHAFTER, ORIGIN, radius);
}
stock EF_FindClientInPVS(const CLIENT) stock EF_FindClientInPVS(const CLIENT) {
return engfunc(EngFunc_FindClientInPVS, CLIENT); return engfunc(EngFunc_FindClientInPVS, CLIENT);
stock EF_EntitiesInPVS(const CLIENT) }
stock EF_EntitiesInPVS(const CLIENT) {
return engfunc(EngFunc_EntitiesInPVS, CLIENT); return engfunc(EngFunc_EntitiesInPVS, CLIENT);
stock EF_MakeVectors(const Float:VECTOR[3]) }
stock EF_MakeVectors(const Float:VECTOR[3]) {
return engfunc(EngFunc_MakeVectors, VECTOR); return engfunc(EngFunc_MakeVectors, VECTOR);
stock EF_AngleVectors(const Float:VECTOR[3], Float:forward_[3], Float:right[3], Float:up[3]) }
stock EF_AngleVectors(const Float:VECTOR[3], Float:forward_[3], Float:right[3], Float:up[3]) {
return engfunc(EngFunc_AngleVectors, VECTOR, forward_, right, up); return engfunc(EngFunc_AngleVectors, VECTOR, forward_, right, up);
stock EF_CreateEntity() }
stock EF_CreateEntity() {
return engfunc(EngFunc_CreateEntity); return engfunc(EngFunc_CreateEntity);
}
stock EF_RemoveEntity(const ENTITY) stock EF_RemoveEntity(const ENTITY) {
return engfunc(EngFunc_RemoveEntity, ENTITY); return engfunc(EngFunc_RemoveEntity, ENTITY);
stock EF_CreateNamedEntity(const CLASSNAME) }
stock EF_CreateNamedEntity(const CLASSNAME) {
return engfunc(EngFunc_CreateNamedEntity, CLASSNAME); return engfunc(EngFunc_CreateNamedEntity, CLASSNAME);
stock EF_MakeStatic(const ENTITY) }
stock EF_MakeStatic(const ENTITY) {
return engfunc(EngFunc_MakeStatic, ENTITY); return engfunc(EngFunc_MakeStatic, ENTITY);
stock EF_EntIsOnFloor(const ENTITY) }
stock EF_EntIsOnFloor(const ENTITY) {
return engfunc(EngFunc_EntIsOnFloor, ENTITY); return engfunc(EngFunc_EntIsOnFloor, ENTITY);
stock EF_DropToFloor(const ENTITY) }
stock EF_DropToFloor(const ENTITY) {
return engfunc(EngFunc_DropToFloor, ENTITY); return engfunc(EngFunc_DropToFloor, ENTITY);
}
stock EF_WalkMove(const ENTITY, Float:yaw, Float:distance, iMode) stock EF_WalkMove(const ENTITY, Float:yaw, Float:distance, iMode) {
return engfunc(EngFunc_WalkMove, ENTITY, yaw, distance, iMode); return engfunc(EngFunc_WalkMove, ENTITY, yaw, distance, iMode);
stock EF_SetOrigin(const ENTITY, const Float:ORIGIN[3]) }
stock EF_SetOrigin(const ENTITY, const Float:ORIGIN[3]) {
return engfunc(EngFunc_SetOrigin, ENTITY, ORIGIN); return engfunc(EngFunc_SetOrigin, ENTITY, ORIGIN);
stock EF_EmitSound(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) }
stock EF_EmitSound(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) {
return engfunc(EngFunc_EmitSound, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch); return engfunc(EngFunc_EmitSound, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch);
stock EF_EmitAmbientSound(const ENTITY, Float:pos[3], const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) }
stock EF_EmitAmbientSound(const ENTITY, Float:pos[3], const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch) {
return engfunc(EngFunc_EmitAmbientSound, ENTITY, pos, SAMPLE, volume, attenuation, fFlags, pitch); return engfunc(EngFunc_EmitAmbientSound, ENTITY, pos, SAMPLE, volume, attenuation, fFlags, pitch);
stock EF_TraceLine(const Float:V1[3], const Float:V2[3], fNoMonsters, const ENT_TO_SKIP) }
stock EF_TraceLine(const Float:V1[3], const Float:V2[3], fNoMonsters, const ENT_TO_SKIP) {
return engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP); return engfunc(EngFunc_TraceLine, V1, V2, fNoMonsters, ENT_TO_SKIP);
}
stock EF_TraceToss(const ENTITY, const ENTITY_TO_IGNORE) stock EF_TraceToss(const ENTITY, const ENTITY_TO_IGNORE) {
return engfunc(EngFunc_TraceToss, ENTITY, ENTITY_TO_IGNORE); return engfunc(EngFunc_TraceToss, ENTITY, ENTITY_TO_IGNORE);
stock EF_TraceMonsterHull(const ENTITY, const Float:V1[3], const Float:V2[3], fNoMonsters, const ENTITY_TO_SKIP) }
stock EF_TraceMonsterHull(const ENTITY, const Float:V1[3], const Float:V2[3], fNoMonsters, const ENTITY_TO_SKIP) {
return engfunc(EngFunc_TraceMonsterHull, ENTITY, V1, V2, fNoMonsters, ENTITY_TO_SKIP); return engfunc(EngFunc_TraceMonsterHull, ENTITY, V1, V2, fNoMonsters, ENTITY_TO_SKIP);
stock EF_TraceHull(const Float:V1[3], const Float:V2[3], fNoMonsters, hullNumber, const ENTITY_TO_SKIP) }
stock EF_TraceHull(const Float:V1[3], const Float:V2[3], fNoMonsters, hullNumber, const ENTITY_TO_SKIP) {
return engfunc(EngFunc_TraceHull, V1, V2, fNoMonsters, hullNumber, ENTITY_TO_SKIP); return engfunc(EngFunc_TraceHull, V1, V2, fNoMonsters, hullNumber, ENTITY_TO_SKIP);
stock EF_TraceModel(const Float:V1[3], const Float:V2[3], hullNumber, const ENTITY) }
stock EF_TraceModel(const Float:V1[3], const Float:V2[3], hullNumber, const ENTITY) {
return engfunc(EngFunc_TraceModel, V1, V2, hullNumber, ENTITY); return engfunc(EngFunc_TraceModel, V1, V2, hullNumber, ENTITY);
stock EF_TraceTexture(const TEXTURE_ENTITY, const Float:V1[3], const Float:V2[3]) }
stock EF_TraceTexture(const TEXTURE_ENTITY, const Float:V1[3], const Float:V2[3]) {
return engfunc(EngFunc_TraceTexture, TEXTURE_ENTITY, V1, V2); return engfunc(EngFunc_TraceTexture, TEXTURE_ENTITY, V1, V2);
}
stock EF_TraceSphere(const Float:V1[3], const Float:V2[3], fNoMonsters, Float:radius, const ENTITY_TO_SKIP) stock EF_TraceSphere(const Float:V1[3], const Float:V2[3], fNoMonsters, Float:radius, const ENTITY_TO_SKIP) {
return engfunc(EngFunc_TraceSphere, V1, V2, fNoMonsters, radius, ENTITY_TO_SKIP); return engfunc(EngFunc_TraceSphere, V1, V2, fNoMonsters, radius, ENTITY_TO_SKIP);
stock EF_GetAimVector(const ENTITY, Float:speed, Float:returnVector[3]) }
stock EF_GetAimVector(const ENTITY, Float:speed, Float:returnVector[3]) {
return engfunc(EngFunc_GetAimVector, ENTITY, speed, returnVector); return engfunc(EngFunc_GetAimVector, ENTITY, speed, returnVector);
stock EF_ParticleEffect(const Float:ORIGIN[3], const Float:DIRECTION[3], Float:color, Float:count) }
stock EF_ParticleEffect(const Float:ORIGIN[3], const Float:DIRECTION[3], Float:color, Float:count) {
return engfunc(EngFunc_ParticleEffect, ORIGIN, DIRECTION, color, count); return engfunc(EngFunc_ParticleEffect, ORIGIN, DIRECTION, color, count);
stock EF_LightStyle(style, val[]) }
stock EF_LightStyle(style, val[]) {
return engfunc(EngFunc_LightStyle, style, val); return engfunc(EngFunc_LightStyle, style, val);
stock EF_DecalIndex(const NAME[]) }
stock EF_DecalIndex(const NAME[]) {
return engfunc(EngFunc_DecalIndex, NAME); return engfunc(EngFunc_DecalIndex, NAME);
}
stock EF_PointContents(const Float:VECTOR[3]) stock EF_PointContents(const Float:VECTOR[3]) {
return engfunc(EngFunc_PointContents, VECTOR); return engfunc(EngFunc_PointContents, VECTOR);
stock EF_FreeEntPrivateData(const ENTITY) }
stock EF_FreeEntPrivateData(const ENTITY) {
return engfunc(EngFunc_FreeEntPrivateData, ENTITY); return engfunc(EngFunc_FreeEntPrivateData, ENTITY);
stock EF_SzFromIndex(iString) }
stock EF_SzFromIndex(iString) {
return engfunc(EngFunc_SzFromIndex, iString); return engfunc(EngFunc_SzFromIndex, iString);
stock EF_AllocString(const STRING[]) }
stock EF_AllocString(const STRING[]) {
return engfunc(EngFunc_AllocString, STRING); return engfunc(EngFunc_AllocString, STRING);
stock EF_RegUserMsg(const NAME[], iSize) }
stock EF_RegUserMsg(const NAME[], iSize) {
return engfunc(EngFunc_RegUserMsg, NAME, iSize); return engfunc(EngFunc_RegUserMsg, NAME, iSize);
}
stock EF_AnimationAutomove(const ENTITY, Float:flTime) stock EF_AnimationAutomove(const ENTITY, Float:flTime) {
return engfunc(EngFunc_AnimationAutomove, ENTITY, flTime); return engfunc(EngFunc_AnimationAutomove, ENTITY, flTime);
stock EF_GetBonePosition(const ENTITY, iBone, Float:origin[3], Float:angles[3]) }
stock EF_GetBonePosition(const ENTITY, iBone, Float:origin[3], Float:angles[3]) {
return engfunc(EngFunc_GetBonePosition, ENTITY, iBone, origin, angles); return engfunc(EngFunc_GetBonePosition, ENTITY, iBone, origin, angles);
stock EF_GetAttachment(const ENTITY, iAttachment, Float:origin[3], Float:angles[3]) }
stock EF_GetAttachment(const ENTITY, iAttachment, Float:origin[3], Float:angles[3]) {
return engfunc(EngFunc_GetAttachment, ENTITY, iAttachment, origin, angles); return engfunc(EngFunc_GetAttachment, ENTITY, iAttachment, origin, angles);
stock EF_SetView(const CLIENT, const VIEW_ENTITY) }
stock EF_SetView(const CLIENT, const VIEW_ENTITY) {
return engfunc(EngFunc_SetView, CLIENT, VIEW_ENTITY); return engfunc(EngFunc_SetView, CLIENT, VIEW_ENTITY);
stock EF_Time(&Float:returnValue) }
stock EF_Time(&Float:returnValue) {
return engfunc(EngFunc_Time, returnValue); return engfunc(EngFunc_Time, returnValue);
}
stock EF_CrosshairAngle(const CLIENT, Float:pitch, Float:yaw) stock EF_CrosshairAngle(const CLIENT, Float:pitch, Float:yaw) {
return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw); return engfunc(EngFunc_CrosshairAngle, CLIENT, pitch, yaw);
stock EF_FadeClientVolume(const ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds) }
stock EF_FadeClientVolume(const ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds) {
return engfunc(EngFunc_FadeClientVolume, ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds); return engfunc(EngFunc_FadeClientVolume, ENTITY, fadePercent, fadeOutSeconds, holdTime, fadeInSeconds);
stock EF_SetClientMaxspeed(const ENTITY, Float:newMaxspeed) }
stock EF_SetClientMaxspeed(const ENTITY, Float:newMaxspeed) {
return engfunc(EngFunc_SetClientMaxspeed, ENTITY, newMaxspeed); return engfunc(EngFunc_SetClientMaxspeed, ENTITY, newMaxspeed);
stock EF_CreateFakeClient(const NETNAME[]) }
stock EF_CreateFakeClient(const NETNAME[]) {
return engfunc(EngFunc_CreateFakeClient, NETNAME); return engfunc(EngFunc_CreateFakeClient, NETNAME);
stock EF_RunPlayerMove(const FAKECLIENT, const Float:VIEWANGLES[3], Float:forwardmove, Float:sidemove, Float:upmove, buttons, impulse, msec) }
stock EF_RunPlayerMove(const FAKECLIENT, const Float:VIEWANGLES[3], Float:forwardmove, Float:sidemove, Float:upmove, buttons, impulse, msec) {
return engfunc(EngFunc_RunPlayerMove, FAKECLIENT, VIEWANGLES, forwardmove, sidemove, upmove, buttons, impulse, msec); return engfunc(EngFunc_RunPlayerMove, FAKECLIENT, VIEWANGLES, forwardmove, sidemove, upmove, buttons, impulse, msec);
}
stock EF_NumberOfEntities() stock EF_NumberOfEntities() {
return engfunc(EngFunc_NumberOfEntities); return engfunc(EngFunc_NumberOfEntities);
}
stock EF_StaticDecal(const Float:ORIGIN[3], decalIndex, entityIndex, modelIndex) stock EF_StaticDecal(const Float:ORIGIN[3], decalIndex, entityIndex, modelIndex)
return engfunc(EngFunc_StaticDecal, ORIGIN, decalIndex, entityIndex, modelIndex); return engfunc(EngFunc_StaticDecal, ORIGIN, decalIndex, entityIndex, modelIndex);
stock EF_PrecacheGeneric(const STRING[]) stock EF_PrecacheGeneric(const STRING[]) {
return engfunc(EngFunc_PrecacheGeneric, STRING); return engfunc(EngFunc_PrecacheGeneric, STRING);
stock EF_BuildSoundMSG(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch, msg_dest, msg_type, const Float:ORIGIN[3], const ED) }
stock EF_BuildSoundMSG(const ENTITY, channel, const SAMPLE[], Float:volume, Float:attenuation, fFlags, pitch, msg_dest, msg_type, const Float:ORIGIN[3], const ED) {
return engfunc(EngFunc_BuildSoundMsg, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch, msg_dest, msg_type, ORIGIN, ED); return engfunc(EngFunc_BuildSoundMsg, ENTITY, channel, SAMPLE, volume, attenuation, fFlags, pitch, msg_dest, msg_type, ORIGIN, ED);
stock EF_GetPhysicsKeyValue(const CLIENT, const KEY[]) }
stock EF_GetPhysicsKeyValue(const CLIENT, const KEY[]) {
return engfunc(EngFunc_GetPhysicsKeyValue, CLIENT, KEY); return engfunc(EngFunc_GetPhysicsKeyValue, CLIENT, KEY);
}
stock EF_SetPhysicsKeyValue(const CLIENT, const KEY[], const VALUE[]) stock EF_SetPhysicsKeyValue(const CLIENT, const KEY[], const VALUE[]) {
return engfunc(EngFunc_SetPhysicsKeyValue, CLIENT, KEY, VALUE); return engfunc(EngFunc_SetPhysicsKeyValue, CLIENT, KEY, VALUE);
stock EF_GetPhysicsInfoString(const CLIENT, returnString[], maxLength) }
stock EF_GetPhysicsInfoString(const CLIENT, returnString[], maxLength) {
return engfunc(EngFunc_GetPhysicsInfoString, CLIENT, returnString, maxLength); return engfunc(EngFunc_GetPhysicsInfoString, CLIENT, returnString, maxLength);
stock EF_PrecacheEvent(type, const STRING[]) }
stock EF_PrecacheEvent(type, const STRING[]) {
return engfunc(EngFunc_PrecacheEvent, type, STRING); return engfunc(EngFunc_PrecacheEvent, type, STRING);
stock EF_PlaybackEvent(flags, const INVOKER, eventindex, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) }
stock EF_PlaybackEvent(flags, const INVOKER, eventindex, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iparam1, iparam2, bparam1, bparam2) {
return engfunc(EngFunc_PlaybackEvent, flags, INVOKER, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2); return engfunc(EngFunc_PlaybackEvent, flags, INVOKER, eventindex, delay, origin, angles, fparam1, fparam2, iparam1, iparam2, bparam1, bparam2);
stock EF_CheckVisibility(const ENTITY, set) }
stock EF_CheckVisibility(const ENTITY, set) {
return engfunc(EngFunc_CheckVisibility, ENTITY, set); return engfunc(EngFunc_CheckVisibility, ENTITY, set);
}
stock EF_GetCurrentPlayer() stock EF_GetCurrentPlayer() {
return engfunc(EngFunc_GetCurrentPlayer); return engfunc(EngFunc_GetCurrentPlayer);
stock EF_CanSkipPlayer(const PLAYER) }
stock EF_CanSkipPlayer(const PLAYER) {
return engfunc(EngFunc_CanSkipPlayer, PLAYER); return engfunc(EngFunc_CanSkipPlayer, PLAYER);
stock EF_SetGroupMask(mask, op) }
stock EF_SetGroupMask(mask, op) {
return engfunc(EngFunc_SetGroupMask, mask, op); return engfunc(EngFunc_SetGroupMask, mask, op);
stock EF_GetClientListening(receiver, sender) }
stock EF_GetClientListening(receiver, sender) {
return engfunc(EngFunc_GetClientListening, receiver, sender); return engfunc(EngFunc_GetClientListening, receiver, sender);
stock EF_SetClientListening(receiver, sender, bool:listen) }
stock EF_SetClientListening(receiver, sender, bool:listen) {
return engfunc(EngFunc_SetClientListening, receiver, sender, listen); return engfunc(EngFunc_SetClientListening, receiver, sender, listen);
}
stock EF_MessageBegin(msg_dest, msg_type, const Float:ORIGIN[3], const ED) stock EF_MessageBegin(msg_dest, msg_type, const Float:ORIGIN[3], const ED) {
return engfunc(EngFunc_MessageBegin, msg_dest, msg_type, ORIGIN, ED); return engfunc(EngFunc_MessageBegin, msg_dest, msg_type, ORIGIN, ED);
stock EF_WriteCoord(Float:value) }
stock EF_WriteCoord(Float:value) {
return engfunc(EngFunc_WriteCoord, value); return engfunc(EngFunc_WriteCoord, value);
stock EF_WriteAngle(Float:value) }
stock EF_WriteAngle(Float:value) {
return engfunc(EngFunc_WriteAngle, value); return engfunc(EngFunc_WriteAngle, value);
stock EF_InfoKeyValue(const INFOBUFFER, const KEY[], returnValue[], maxLength) }
stock EF_InfoKeyValue(const INFOBUFFER, const KEY[], returnValue[], maxLength) {
return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength); return engfunc(EngFunc_InfoKeyValue, INFOBUFFER, KEY, returnValue, maxLength);
stock EF_SetKeyValue(const INFOBUFFER, const KEY[], const VALUE[]) }
stock EF_SetKeyValue(const INFOBUFFER, const KEY[], const VALUE[]) {
return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE); return engfunc(EngFunc_SetKeyValue, INFOBUFFER, KEY, VALUE);
}
stock EF_SetClientKeyValue(const ID, const INFOBUFFER, const KEY[], const VALUE[]) stock EF_SetClientKeyValue(const ID, const INFOBUFFER, const KEY[], const VALUE[]) {
return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE); return engfunc(EngFunc_SetClientKeyValue, ID, INFOBUFFER, KEY, VALUE);
}
stock EF_CreateInstBaseline(CLASSNAME, baseline) stock EF_CreateInstBaseline(CLASSNAME, baseline) {
return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline); return engfunc(EngFunc_CreateInstBaseline, CLASSNAME, baseline);
}
// Returns pointer to info buffer that can be used with the INFOBUFFER param // Returns pointer to info buffer that can be used with the INFOBUFFER param
// of EF_InfoKeyValue, EF_SetKeyValue, and EF_SetClientKeyValue // of EF_InfoKeyValue, EF_SetKeyValue, and EF_SetClientKeyValue
stock EF_GetInfoKeyBuffer(const ENTITY) stock EF_GetInfoKeyBuffer(const ENTITY) {
return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY); return engfunc(EngFunc_GetInfoKeyBuffer, ENTITY);
stock EF_ClientPrintf(const ENTITY, const printType, const MESSAGE[]) }
stock EF_ClientPrintf(const ENTITY, const printType, const MESSAGE[]) {
return engfunc(EngFunc_ClientPrintf, ENTITY, printType, MESSAGE); return engfunc(EngFunc_ClientPrintf, ENTITY, printType, MESSAGE);
stock EF_ServerPrint(const MESSAGE[]) }
stock EF_ServerPrint(const MESSAGE[]) {
return engfunc(EngFunc_ServerPrint, MESSAGE); return engfunc(EngFunc_ServerPrint, MESSAGE);
}
// DLLFuncs // DLLFuncs
stock DF_GameInit() stock DF_GameInit() {
return dllfunc(DLLFunc_GameInit); return dllfunc(DLLFunc_GameInit);
stock DF_Spawn(const ENTITY) }
stock DF_Spawn(const ENTITY) {
return dllfunc(DLLFunc_Spawn, ENTITY); return dllfunc(DLLFunc_Spawn, ENTITY);
stock DF_Think(const ENTITY) }
stock DF_Think(const ENTITY) {
return dllfunc(DLLFunc_Think, ENTITY); return dllfunc(DLLFunc_Think, ENTITY);
stock DF_Use(const ENT_Used, const ENT_User) }
stock DF_Use(const ENT_Used, const ENT_User) {
return dllfunc(DLLFunc_Use, ENT_Used, ENT_User); return dllfunc(DLLFunc_Use, ENT_Used, ENT_User);
stock DF_Touch(const ENT_Touched, const ENT_Toucher) }
stock DF_Touch(const ENT_Touched, const ENT_Toucher) {
return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher); return dllfunc(DLLFunc_Touch, ENT_Touched, ENT_Toucher);
}
stock DF_Blocked(const ENT_Blocked, const ENT_Other) stock DF_Blocked(const ENT_Blocked, const ENT_Other) {
return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other); return dllfunc(DLLFunc_Blocked, ENT_Blocked, ENT_Other);
stock DF_SetAbsBox(const ENTITY) }
stock DF_SetAbsBox(const ENTITY) {
return dllfunc(DLLFunc_SetAbsBox, ENTITY); return dllfunc(DLLFunc_SetAbsBox, ENTITY);
stock DF_ClientConnect(const ENTITY, const NAME[], const ADDRESS[], RejectReason[128]) }
stock DF_ClientConnect(const ENTITY, const NAME[], const ADDRESS[], RejectReason[128]) {
return dllfunc(DLLFunc_ClientConnect, ENTITY, NAME, ADDRESS, RejectReason); return dllfunc(DLLFunc_ClientConnect, ENTITY, NAME, ADDRESS, RejectReason);
stock DF_ClientDisconnect(const ENTITY) }
stock DF_ClientDisconnect(const ENTITY) {
return dllfunc(DLLFunc_ClientDisconnect, ENTITY); return dllfunc(DLLFunc_ClientDisconnect, ENTITY);
stock DF_ClientKill(const ENTITY) }
stock DF_ClientKill(const ENTITY) {
return dllfunc(DLLFunc_ClientKill, ENTITY); return dllfunc(DLLFunc_ClientKill, ENTITY);
}
stock DF_ClientPutInServer(const ENTITY) stock DF_ClientPutInServer(const ENTITY) {
return dllfunc(DLLFunc_ClientPutInServer, ENTITY); return dllfunc(DLLFunc_ClientPutInServer, ENTITY);
stock DF_ClientCommand(const ENTITY) }
stock DF_ClientCommand(const ENTITY) {
return dllfunc(DLLFunc_ClientCommand, ENTITY); return dllfunc(DLLFunc_ClientCommand, ENTITY);
stock DF_ServerDeactivate() }
stock DF_ServerDeactivate() {
return dllfunc(DLLFunc_ServerDeactivate); return dllfunc(DLLFunc_ServerDeactivate);
stock DF_PlayerPreThink(const ENTITY) }
stock DF_PlayerPreThink(const ENTITY) {
return dllfunc(DLLFunc_PlayerPreThink, ENTITY); return dllfunc(DLLFunc_PlayerPreThink, ENTITY);
stock DF_PlayerPostThink(const ENTITY) }
stock DF_PlayerPostThink(const ENTITY) {
return dllfunc(DLLFunc_PlayerPostThink, ENTITY); return dllfunc(DLLFunc_PlayerPostThink, ENTITY);
}
stock DF_StartFrame() stock DF_StartFrame() {
return dllfunc(DLLFunc_StartFrame); return dllfunc(DLLFunc_StartFrame);
stock DF_ParmsNewLevel() }
stock DF_ParmsNewLevel() {
return dllfunc(DLLFunc_ParmsNewLevel); return dllfunc(DLLFunc_ParmsNewLevel);
stock DF_ParmsChangeLevel() }
stock DF_ParmsChangeLevel() {
return dllfunc(DLLFunc_ParmsChangeLevel); return dllfunc(DLLFunc_ParmsChangeLevel);
stock DF_GetGameDescription() }
stock DF_GetGameDescription() {
return dllfunc(DLLFunc_GetGameDescription); return dllfunc(DLLFunc_GetGameDescription);
stock DF_SpectatorConnect(const ENTITY) }
stock DF_SpectatorConnect(const ENTITY) {
return dllfunc(DLLFunc_SpectatorConnect, ENTITY); return dllfunc(DLLFunc_SpectatorConnect, ENTITY);
}
stock DF_SpectatorDisconnect(const ENTITY) stock DF_SpectatorDisconnect(const ENTITY) {
return dllfunc(DLLFunc_SpectatorDisconnect, ENTITY); return dllfunc(DLLFunc_SpectatorDisconnect, ENTITY);
stock DF_SpectatorThink(const ENTITY) }
stock DF_SpectatorThink(const ENTITY) {
return dllfunc(DLLFunc_SpectatorThink, ENTITY); return dllfunc(DLLFunc_SpectatorThink, ENTITY);
stock DF_Sys_Error(const ERROR_STRING[]) }
stock DF_Sys_Error(const ERROR_STRING[]) {
return dllfunc(DLLFunc_Sys_Error, ERROR_STRING); return dllfunc(DLLFunc_Sys_Error, ERROR_STRING);
stock DF_PM_FindTextureType(name[]) }
stock DF_PM_FindTextureType(name[]) {
return dllfunc(DLLFunc_PM_FindTextureType, name); return dllfunc(DLLFunc_PM_FindTextureType, name);
stock DF_RegisterEncoders() }
stock DF_RegisterEncoders() {
return dllfunc(DLLFunc_RegisterEncoders); return dllfunc(DLLFunc_RegisterEncoders);
}
stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3]) stock DF_GetHullBounds(hullnumber, Float:mins[3], Float:maxs[3]) {
return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs); return dllfunc(DLLFunc_GetHullBounds, hullnumber, mins, maxs);
stock DF_CreateInstBaselines() }
stock DF_CreateInstBaselines() {
return dllfunc(DLLFunc_CreateInstBaselines); return dllfunc(DLLFunc_CreateInstBaselines);
stock DF_pfnAllowLagCompensation() }
stock DF_pfnAllowLagCompensation() {
return dllfunc(DLLFunc_pfnAllowLagCompensation); return dllfunc(DLLFunc_pfnAllowLagCompensation);
stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY) }
stock DF_MetaFunc_CallGameEntity(const STRING[], const ENTITY) {
return dllfunc(MetaFunc_CallGameEntity, STRING, ENTITY); return dllfunc(MetaFunc_CallGameEntity, STRING, ENTITY);
stock DF_ClientUserInfoChanged(const IDPLAYER) }
stock DF_ClientUserInfoChanged(const IDPLAYER) {
return dllfunc(DLLFunc_ClientUserInfoChanged, IDPLAYER); return dllfunc(DLLFunc_ClientUserInfoChanged, IDPLAYER);
}
stock DF_UpdateClientData(const ENTITY, sendweapons, const cd/* = 0*/) stock DF_UpdateClientData(const ENTITY, sendweapons, const cd/* = 0*/) {
return dllfunc(DLLFunc_UpdateClientData, ENTITY, sendweapons, cd); return dllfunc(DLLFunc_UpdateClientData, ENTITY, sendweapons, cd);
stock DF_AddToFullPack(const STATE/* = 0*/, e, ENT, HOST, hostflags, player, set) }
stock DF_AddToFullPack(const STATE/* = 0*/, e, ENT, HOST, hostflags, player, set) {
return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set); return dllfunc(DLLFunc_AddToFullPack, STATE, e, ENT, HOST, hostflags, player, set);
stock DF_CmdStart(const PLAYER, const CMD/* = 0*/, randomSeed) }
stock DF_CmdStart(const PLAYER, const CMD/* = 0*/, randomSeed) {
return dllfunc(DLLFunc_CmdStart, PLAYER, CMD, randomSeed); return dllfunc(DLLFunc_CmdStart, PLAYER, CMD, randomSeed);
stock DF_CmdEnd(const PLAYER) }
stock DF_CmdEnd(const PLAYER) {
return dllfunc(DLLFunc_CmdEnd, PLAYER); return dllfunc(DLLFunc_CmdEnd, PLAYER);
stock DF_CreateBaseline(PLAYER, eIndex, baseline, playerModelIndex, Float:playerMins[3], Float:playerMaxs[3]) }
stock DF_CreateBaseline(PLAYER, eIndex, baseline, playerModelIndex, Float:playerMins[3], Float:playerMaxs[3]) {
return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs); return dllfunc(DLLFunc_CreateBaseline, PLAYER, eIndex, baseline, playerModelIndex, playerMins, playerMaxs);
}

View File

@ -58,7 +58,7 @@ native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[],
*/ */
stock HamHook:RegisterHamPlayer(Ham:function, const Callback[], Post=0) stock HamHook:RegisterHamPlayer(Ham:function, const Callback[], Post=0)
{ {
return RegisterHam(function, "player", Callback, Post, .specialbot = true); return RegisterHam(function, "player", Callback, Post, true);
} }
/** /**

View File

@ -59,4 +59,4 @@ native AddTranslation(const lang[3], TransKey:key, const phrase[]);
* NOTE: LANG_PLAYER is invalid in this, use a player index * NOTE: LANG_PLAYER is invalid in this, use a player index
* or LANG_SERVER * or LANG_SERVER
*/ */
native LookupLangKey(Output[], OutputSize, const Key[], const &id); native LookupLangKey(Output[], OutputSize, const Key[], &id);

View File

@ -114,7 +114,7 @@ stock client_printex(index, type, const msg_name[], const msg_param1[] = "", con
msgTextMsg = get_user_msgid("TextMsg"); msgTextMsg = get_user_msgid("TextMsg");
} }
message_begin(index > 0 ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgTextMsg, .player = index); message_begin(index > 0 ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, msgTextMsg, {0,0,0}, index);
write_byte(type); write_byte(type);
write_string(msg_name); write_string(msg_name);
if (msg_param1[0]) { write_string(msg_param1); } if (msg_param1[0]) { write_string(msg_param1); }

View File

@ -31,7 +31,7 @@ native nvault_open(const name[]);
/* Gets a vault value by returning an int /* Gets a vault value by returning an int
* setting a byref float or setting a string + maxlength * setting a byref float or setting a string + maxlength
*/ */
native nvault_get(vault, const key[], {Float,_}:...); native nvault_get(vault, const key[], any:...);
/* Looks up a vault value for full information /* Looks up a vault value for full information
* Returns 0 if the entry is not found * Returns 0 if the entry is not found

View File

@ -190,7 +190,7 @@ native SQL_IsNull(Handle:query, column);
* SQL_ReadResult(query, 1, num2) * SQL_ReadResult(query, 1, num2)
* SQL_ReadResult(query, 2, str, 31) * SQL_ReadResult(query, 2, str, 31)
*/ */
native SQL_ReadResult(Handle:query, column, {Float,_}:...); native SQL_ReadResult(Handle:query, column, any:...);
/** /**

View File

@ -81,13 +81,33 @@ native ts_giveweapon( index,weapon,clips,extra );
native ts_getuserpwup( index ); native ts_getuserpwup( index );
stock ts_has_slowmo(id) return (ts_getuserpwup(id) &TSPWUP_SLOWMO); stock ts_has_slowmo(id) {
stock ts_has_infammo(id) return (ts_getuserpwup(id) &TSPWUP_INFAMMO); return (ts_getuserpwup(id) &TSPWUP_SLOWMO);
stock ts_has_slowpause(id) return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE); }
stock ts_has_dfirerate(id) return (ts_getuserpwup(id) &TSPWUP_DFIRERATE);
stock ts_has_grenade(id) return (ts_getuserpwup(id) &TSPWUP_GRENADE); stock ts_has_infammo(id) {
stock ts_has_health(id) return (ts_getuserpwup(id) &TSPWUP_HEALTH); return (ts_getuserpwup(id) &TSPWUP_INFAMMO);
stock ts_has_armor(id) return (ts_getuserpwup(id) &TSPWUP_ARMOR); }
stock ts_has_slowpause(id) {
return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE);
}
stock ts_has_dfirerate(id) {
return (ts_getuserpwup(id) &TSPWUP_DFIRERATE);
}
stock ts_has_grenade(id) {
return (ts_getuserpwup(id) &TSPWUP_GRENADE);
}
stock ts_has_health(id) {
return (ts_getuserpwup(id) &TSPWUP_HEALTH);
}
stock ts_has_armor(id) {
return (ts_getuserpwup(id) &TSPWUP_ARMOR);
}
/* Function will create pwup entity and return its index (pwupent) */ /* Function will create pwup entity and return its index (pwupent) */
native ts_createpwup( pwup ); native ts_createpwup( pwup );
@ -112,13 +132,34 @@ stock ts_is_normal(id)
if( (msg > 11) || (msg > 6 && msg < 10) ) return 1; if( (msg > 11) || (msg > 6 && msg < 10) ) return 1;
return 0; return 0;
} }
stock ts_is_waiting(id) return (ts_get_message(id) == TSMSG_WAITING);
stock ts_is_dead(id) return (ts_get_message(id) == TSMSG_DEAD); stock ts_is_waiting(id) {
stock ts_is_killer(id) return (ts_get_message(id) == TSMSG_KILLER); return (ts_get_message(id) == TSMSG_WAITING);
stock ts_is_demolition(id) return (ts_get_message(id) == TSMSG_DEMOLITION); }
stock ts_is_specialist(id) return (ts_get_message(id) == TSMSG_SPECIALIST);
stock ts_is_unstoppable(id) return (ts_get_message(id) == TSMSG_UNSTOPPABLE); stock ts_is_dead(id) {
stock ts_is_theone(id) return (ts_get_message(id) == TSMSG_THEONE); return (ts_get_message(id) == TSMSG_DEAD);
}
stock ts_is_killer(id) {
return (ts_get_message(id) == TSMSG_KILLER);
}
stock ts_is_demolition(id) {
return (ts_get_message(id) == TSMSG_DEMOLITION);
}
stock ts_is_specialist(id) {
return (ts_get_message(id) == TSMSG_SPECIALIST);
}
stock ts_is_unstoppable(id) {
return (ts_get_message(id) == TSMSG_UNSTOPPABLE);
}
stock ts_is_theone(id) {
return (ts_get_message(id) == TSMSG_THEONE);
}
// Return one on true, 0 on false // Return one on true, 0 on false
// UNAVAILABLE IN 1.70 // UNAVAILABLE IN 1.70

View File

@ -101,7 +101,7 @@ enum xs_logtypes
stock const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"}; stock const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"};
// tested // tested
stock xs_log(xs_logtypes:logtype, {Float,_}:...) stock xs_log(xs_logtypes:logtype, any:...)
{ {
// WARNING: Don't try to use assert in here; it uses this func // WARNING: Don't try to use assert in here; it uses this func
@ -123,7 +123,7 @@ stock xs_log(xs_logtypes:logtype, {Float,_}:...)
// Assertion // Assertion
// tested // tested
stock xs_assertfunc({Float,_}:exp, const desc[]) stock xs_assertfunc(any:exp, const desc[])
{ {
// Check exp // Check exp
if (exp) if (exp)