Hi!
The question is , how can it be resolved that a fakeplayernek , that is for a BOT , values are given . how much should be the rate, cl_updaterate etc .. Below enclose the source code to see what the idea . Also , I would really appreciate it if you would add a cvar , or a menu where you can add bots .
Idea:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_stocks>
#include <cstrike>
#include <bot_api>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
public create_bot(const name[])
{
new id
id = EF_CreateFakeClient(name)
if (pev_valid(id))
{
EF_FreeEntPrivateData(id)
DF_MetaFunc_CallGameEntity("player", id)
set_user_info(id, "console_command", "value")
set_user_info(id, "console_command", "value")
if(SFL_SHOWBOTPINGASBOT & getPCvarAsFlags(g_cvarFlags))
set_user_info(id, "*bot", "1")
set_pev(id, pev_flags, pev(id, pev_flags) | FL_FAKECLIENT)
set_pev(id, pev_colormap, id)
new msg[128]
DF_ClientConnect(id, name, "127.0.0.1", msg)
DF_ClientPutInServer(id)
EF_RunPlayerMove(id, Float:{0.0,0.0,0.0}, 0.0, 0.0, 0.0, 0, 0, 76)
return id
}
return 0
}
}
The essence would be to:
\rBOT MENU:
1. \yIrving BOT
2. \yXaver BOT
3. \yAsd BOT
These names , to be associated with a specific IP address , which means:
1. Irving BOT - 127.0.0.1
2. Xaver BOT - XYZ.X.Y.Z
3. Asd BOT - 123.4.5.65
The values for each bot can , so these:
Code:
set_user_info(id, "console_command", "value")
set_user_info(id, "console_command", "value")
Bit stuck , and I ask for your help in this .
SORRY, My BAD English
Thank you in advance!