Quote:
Originally Posted by microleo
PHP Code:
int bot = CreateFakeClient("fake"); ChangeClientTeam(bot, 2); 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(fakeclient, TEAM_SURVIVORS)
// check if entity classname is survivorbot
if(DispatchKeyValue(fakeclient, "classname", "survivorbot") == true)
{
// spawn the client
if(DispatchSpawn(fakeclient) == true)
{
}
}
}
__________________