Quote:
Originally Posted by Marttt
this snippet is wrong (what is this bot variable) so is hard to help
try sharing the full .sp file
|
Copy error, the following is the correct content:
PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
{
if(classname[0] != 's' || strcmp(classname, "survivor_bot", false) != 0)
return;
SDKHook(entity, SDKHook_SpawnPost, SpawnPost_Bot);
}
void SpawnPost_Bot(int entity)
{
if(!IsValidEntity(entity))
return;
if(GetClientTeam(entity) == 4)
{
RemoveEntity(entity);
return;
}
PrintToChatAll("\nDEBUG(%f): SpawnPost_Bot entity(%d) entityowner(%d)", GetEngineTime(), entity, GetEntPropEnt(entity, Prop_Data, "m_hOwnerEntity"));
}
DEBUG(1214.675781): SpawnPost_Bot entity(2) entityowner(-1)
DEBUG(1214.675903): SpawnPost_Bot entity(2) entityowner(-1)
DEBUG(1214.675903): SpawnPost_Bot entity(3) entityowner(-1)
DEBUG(1214.675903): SpawnPost_Bot entity(3) entityowner(-1)
DEBUG(1214.675903): SpawnPost_Bot entity(3) entityowner(-1)
DEBUG(1214.676025): SpawnPost_Bot entity(4) entityowner(-1)
DEBUG(1214.676025): SpawnPost_Bot entity(4) entityowner(-1)