View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-16-2020 , 10:29   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #5

Quote:
Originally Posted by microleo
PHP Code:
    int bot =  CreateFakeClient("fake");
    
ChangeClientTeam(bot2);
    
KickClient(bot);
    
//the bot index is invalid. because bot was disconnected.
    //we can't write code, like that:
    
if(!IsPlayerAlive(bot)) 
So, why you kicking him? Surely, he can't be alive.
What's the practical difference of your extension comparing to:

PHP Code:
    int fakeclient CreateFakeClient("FakeClient")
    
    
// if entity is valid
    
if(fakeclient != 0)
    {
        
// move into survivor team
        
ChangeClientTeam(fakeclientTEAM_SURVIVORS)
        
        
// check if entity classname is survivorbot
        
if(DispatchKeyValue(fakeclient"classname""survivorbot") == true)
        {
            
// spawn the client
            
if(DispatchSpawn(fakeclient) == true)
            {
            }
        }
    } 
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline