After doing a clean install for the second time it started working, but now when i spawn the bot he is invisible.
PHP Code:
public BOT( id )
{
g_iBotIndex = engfunc( EngFunc_CreateFakeClient, "Test Bot" );
if( !g_iBotIndex )
return PLUGIN_HANDLED;
engfunc( EngFunc_FreeEntPrivateData, g_iBotIndex );
static szBlock[ 128 ];
dllfunc( DLLFunc_ClientConnect, g_iBotIndex, "[SV] Pro 1 BOT", "127.0.0.1", szBlock );
if( !is_user_connected( g_iBotIndex ) )
return PLUGIN_HANDLED;
dllfunc( DLLFunc_ClientPutInServer, g_iBotIndex );
set_pev( g_iBotIndex, pev_spawnflags, pev( g_iBotIndex, pev_spawnflags ) | FL_FAKECLIENT );
set_pev( g_iBotIndex, pev_flags, pev( g_iBotIndex,pev_flags ) | FL_FAKECLIENT );
cs_set_user_team( g_iBotIndex, CS_TEAM_CT, CS_CT_GSG9 );
ExecuteHamB( Ham_CS_RoundRespawn, g_iBotIndex ); // Tried
//dllfunc( DLLFunc_Spawn, g_iBotIndex ); // Tried
if( !is_user_alive( g_iBotIndex ) )
return PLUGIN_HANDLED;
//set_user_rendering( g_iBotIndex, kRenderFxNone, 255, 255, 255, kRenderNormal, 25 ); // Tried
fm_set_rendering( g_iBotIndex, kRenderNormal, 255, 255, 255, kRenderNormal, 25 ); // Tried
//fm_set_user_rendering( g_iBotIndex, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 25 ); //Tried
//set_pev( g_iBotIndex, pev_origin, fOrigin );
return PLUGIN_HANDLED;
}
I can see his name, health and he can block me, but he is completely invisible.
Neither option listed above worked.
__________________