added vscript for eternal grove with the slight change that the plugin is not unloading itself

This commit is contained in:
jenz 2025-02-02 12:19:01 +01:00
parent 9eab0fc24f
commit f26c56832c

View File

@ -6,6 +6,14 @@
#endif #endif
#define _ENT_INDEX_included #define _ENT_INDEX_included
stock int Vscripts_GetEntityIndexByHammerID(int HammerID, const char[] classname = "*", int startEnt = -1)
{
while((startEnt = FindEntityByClassname(startEnt,classname))!= -1) {
if (GetEntProp(startEnt, Prop_Data, "m_iHammerID") == HammerID)
return startEnt;
}
return -1;
}
public int GetEntityIndexByHammerID(int HammerID, const char[] classname) { public int GetEntityIndexByHammerID(int HammerID, const char[] classname) {
int i = -1; int i = -1;