From Dajrokan's kz_dajrokan.sma:
Code:
public mi_bot_connect() {
if (!bot_id) {
bot_id = engfunc(EngFunc_CreateFakeClient, BOT_NAME)
new ptr[128]
dllfunc(DLLFunc_ClientConnect, bot_id, BOT_NAME, "127.0.0.1", ptr)
dllfunc(DLLFunc_ClientPutInServer, bot_id)
cs_set_user_team(bot_id, CS_TEAM_CT, CS_CT_URBAN)
dllfunc(DLLFunc_Spawn, bot_id)
set_pev(bot_id, pev_effects, (pev(bot_id, pev_effects) | 128))
set_pev(bot_id, pev_solid, 0)
bot_userid = get_user_userid(bot_id)
set_user_origin(bot_id, origo)
}
return PLUGIN_CONTINUE
}
public mi_bot_disconnect() {
if (bot_id) {
bot_id = 0
server_cmd("kick #%d", bot_userid)
}
return PLUGIN_CONTINUE
}
Hope that helps!?
greetz regalis
__________________