forked from UNLOZE/sm-plugins
SourceMod 1.10 and new OnEntitySpawned forward
This commit is contained in:
@@ -66,23 +66,13 @@ public Action VerifyMap()
|
||||
}
|
||||
}
|
||||
|
||||
public void OnEntityCreated(int iEntity, const char[] sClassname)
|
||||
{
|
||||
if (!IsValidEntity(iEntity) || g_bVoteFinished)
|
||||
return;
|
||||
|
||||
SDKHook(iEntity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||
}
|
||||
|
||||
public void OnEntitySpawned(int iEntity)
|
||||
public void OnEntitySpawned(int iEntity, const char[] sClassname)
|
||||
{
|
||||
if (!IsValidEntity(iEntity) || g_bVoteFinished)
|
||||
return;
|
||||
|
||||
char sTargetname[128];
|
||||
GetEntPropString(iEntity, Prop_Data, "m_iName", sTargetname, sizeof(sTargetname));
|
||||
char sClassname[128];
|
||||
GetEntityClassname(iEntity, sClassname, sizeof(sClassname));
|
||||
|
||||
if ((strcmp(sTargetname, "espad") != 0) && (strcmp(sTargetname, "ss_slow") != 0) && (strcmp(sClassname, "ambient_generic") == 0))
|
||||
AcceptEntityInput(iEntity, "Kill");
|
||||
|
||||
Reference in New Issue
Block a user