Is this possible? I tried fm_give_item but no dice.
Here is my bot creation code if it helps:
I tried calling fm_give_item( g_BotID , "weapon_deagle" ) after the AddBot call in my code.
PHP Code:
public AddBot()
{
new szTeam[2]
new szName[6]
format( szName , 5 , "xyz%2d" , random_num(10,99) )
g_BotID = engfunc(EngFunc_CreateFakeClient, szName )
if ( !g_BotID )
return PLUGIN_HANDLED
engfunc( EngFunc_FreeEntPrivateData, g_BotID )
static szRejectReason[128]
dllfunc( DLLFunc_ClientConnect, g_BotID , szName, "127.0.0.1", szRejectReason )
dllfunc( DLLFunc_ClientPutInServer, g_BotID)
set_pev( g_BotID, pev_spawnflags, pev(g_BotID, pev_spawnflags) | FL_FAKECLIENT )
set_pev( g_BotID, pev_flags, pev(g_BotID,pev_flags) | FL_FAKECLIENT )
//Bot created, assign to appropriate team.
format( szTeam , 1 , "%d" , (fm_cs_get_user_team( g_PlayerToWatch ) == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T )
engclient_cmd( g_BotID, "jointeam", szTeam )
engclient_cmd( g_BotID, "joinclass", "1" )
//Spawn bot
fm_user_spawn( g_BotID )
//Make bot invisible
fm_set_rendering( g_BotID, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0 )
//Make our bot appear as a spectator on scoreboard
message_begin( MSG_ALL, get_user_msgid("TeamInfo") , _, 0 )
write_byte( g_BotID )
write_string( "SPECTATOR" )
message_end()
EnableHamForward( g_Ham_TakeDamage )
return PLUGIN_HANDLED
}
__________________