Hey, thanks a ton for your reply!
I was using a similar example before and seeing it done another way really helped me to understand it better!
Just an update, I got the bots to stop when in an objective area!
Shouldn't be too hard to get em moving again... ;)
I used the following code instead:
Code:
BotSearch()
{
//Declare:
decl MaxPlayers;
//Initialize:
MaxPlayers = GetMaxClients();
//Loop:
for(new client = 1; client <= MaxPlayers; client++)
{
if(IsClientInGame(client) && IsPlayerAlive(client) && IsFakeClient(client))
{
new ent2=-1;
while ((ent2 = FindEntityByClassname(ent2,"ins_objective")) != -1)
{
new Float:vec[3];
GetClientAbsOrigin(client, Float:vec);
decl Float:mins2[3], Float:maxs2[3];
//decl Float:Ent2Position[3];
//GetEntPropVector(ent2,Prop_Send,"m_vecOrigin",Ent2Position);
GetEntPropVector(ent2,Prop_Send,"m_vecMins",mins2);
GetEntPropVector(ent2,Prop_Send,"m_vecMaxs",maxs2);
mins2[0] -= 20, maxs2[0] += 20;
mins2[1] -= 20, maxs2[1] += 20;
mins2[2] -= 20, maxs2[2] += 20;
if (mins2[0] < vec[0] < maxs2[0] && mins2[1] < vec[1] < maxs2[1] && mins2[2] < vec[2] < maxs2[2])
{
SetEntityMoveType(client, MOVETYPE_NONE);
LogToGame("BOC SUCCESS: Bot found (index= %i @ %f %f %f) inside an objective area! (Entity index= %i)", client, vec[0], vec[1], vec[2], ent2);
m_vecOrigin is commented out because it kept returning 0 0 0... but I guess I didn't really need that anyways!
Thanks again!