View Single Post
Author Message
Solar1234
Junior Member
Join Date: Nov 2021
Old 04-28-2024 , 08:51   [L4D2] Why did it trigger twice? What happened in between
Reply With Quote #1

PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
{
    if(
classname[0] != 's' || strcmp(classname"survivor_bot"false) != 0)
        return;

    
SDKHook(entitySDKHook_SpawnPostSpawnPost_Bot);
}

void SpawnPost_Bot(int entity)
{
    if(!
IsValidEntity(entity))
        return;

    if(
GetClientTeam(entity) == 4)
    {
        
RemoveEntity(entity);
        return;
    }
    
    
PrintToChatAll("\nDEBUG(%f): NextFrame SpawnPost_Bot entity(%d) entityowner(%d)"GetEngineTime(), botGetEntPropEnt(botProp_Data"m_hOwnerEntity"));
}

DEBUG(1214.675781): NextFrame SpawnPost_Bot entity(2entityowner(-1)
DEBUG(1214.675903): NextFrame SpawnPost_Bot entity(2entityowner(-1)
DEBUG(1214.675903): NextFrame SpawnPost_Bot entity(3entityowner(-1)
DEBUG(1214.675903): NextFrame SpawnPost_Bot entity(3entityowner(-1)
DEBUG(1214.675903): NextFrame SpawnPost_Bot entity(3entityowner(-1)
DEBUG(1214.676025): NextFrame SpawnPost_Bot entity(4entityowner(-1)
DEBUG(1214.676025): NextFrame SpawnPost_Bot entity(4entityowner(-1
I don't know what survivor_bot spawn, can anyone explain that to me
Solar1234 is offline