Since it's your first plugin, I recommand you to start with the new sourcemod syntax, not the old one, because some new functions from sourcemod are only available in the new sourcemod syntax 1.7+ (
https://wiki.alliedmods.net/SourcePa...itional_Syntax)
If I remember correctly, if you wanna kick a bot you have to decrease the bot quota by 1.
Code:
Handle g_hBotQuota;
public void OnPluginStart()
{
g_hBotQuota = FindConVar("tf_bot_quota");
}
public void RandomFunction()
{
int iBotCount = GetConVarInt(g_hBotQuota);//Get the current bot count.
iBotCount--;//Decrease it by 1 (--)
SetConVarInt(g_hBotQuota,iBotCount);//Set the new bot count.
//Kick the bot.
}
Also I don't know if you are going to use your array somewhere else. But if you do, you should make it like that:
Code:
#define TF_MAX_CLASS 9
#define MAX_TEAMS 4
int g_iPlayer[MAX_TEAMS][TF_MAX_CLASS+1];
so in your function you just have to do this:
Code:
int team = 3;//Blue team
if(IsFakeClient(g_iPlayer[team][view_as<int>(TFClass_Scout)]))
//do stuff here;
The enum of class can be found here:
https://sm.alliedmods.net/new-api/tf2/TFClassType
Final note: it's fine to use an array if you are looking for bot's class often in the code, otherwise it's a waste of memory. You are also assuming with this array that the class limit is 1 for both team, that you can't have 2 blue bots scouts.
__________________