Great idea, will try todo this.
EDIT: This worked for me, the bot refreshes it's name all ten seconds.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
new amx_nextmap
public plugin_init()
{
register_plugin("Nextmap BOT", "1.0", "AMXX Community")
amx_nextmap = get_cvar_pointer("amx_nextmap")
set_task(5.0, "create_bot")
}
public create_bot()
{
new nextmap[64]
get_pcvar_string(amx_nextmap, nextmap, sizeof(nextmap) - 1)
new buffer[75]
formatex(buffer, sizeof(buffer) - 1, "Nextmap: %s", nextmap)
new bot
bot = engfunc(EngFunc_CreateFakeClient, buffer)
new ptr[128]
dllfunc(DLLFunc_ClientConnect, bot, nextmap, "127.0.0.1", ptr)
dllfunc(DLLFunc_ClientPutInServer, bot)
set_user_info(bot, "rate", "3500")
set_user_info(bot, "cl_updaterate", "25")
set_user_info(bot, "cl_lw", "1")
set_user_info(bot, "cl_lc", "1")
set_user_info(bot, "cl_dlmax", "128")
set_user_info(bot, "cl_righthand", "1")
set_user_info(bot, "_vgui_menus", "0")
set_user_info(bot, "_ah", "0")
set_user_info(bot, "dm", "0")
set_user_info(bot, "tracker", "0")
set_user_info(bot, "friends", "0")
set_user_info(bot, "*bot", "1")
cs_set_user_team(bot, CS_TEAM_SPECTATOR, CS_DONTCHANGE)
set_task(10.0, "update_bot_name", bot)
}
public update_bot_name(bot)
{
if(is_user_connected(bot))
{
new nextmap[64]
get_pcvar_string(amx_nextmap, nextmap, sizeof(nextmap) - 1)
new buffer[75]
formatex(buffer, sizeof(buffer) - 1, "Nextmap: %s", nextmap)
set_user_info(bot, "name", buffer)
set_task(10.0, "update_bot_name", bot)
}
}
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.