Raised This Month: $ Target: $400
 0% 

[REQ] Fake Team Bot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BioI-Iazard
Senior Member
Join Date: Sep 2005
Location: Calgary, Alberta
Old 10-01-2007 , 11:33   [REQ] Fake Team Bot
Reply With Quote #1

Hi,
Just wondering if somebody could help me add additional coding to this plugin so that when 4 people join server the bots will be removed...
thanks in advance

here is the code:

Code:
#include <amxmodx> #include <fakemeta> #include <cstrike> new botteam[3] static const botnames[3][] = {     "NULL",     "Terrorist Team",           //Change Terrorist Bot Name     "Counter-Terrorist Team"    //Change CT Bot name     } public plugin_init() {     register_plugin("Fake TeamBot", "1.0", "OneEyed")     register_event("HLTV","StartRound","a","1=0","2=0")     createBots() } public StartRound()     set_task(0.5, "PostStartRound", 0) public PostStartRound()     for(new x=1; x<3; x++) {         set_pev(botteam[x], pev_effects, (pev(botteam[x], pev_effects) | 128) ) //set invisible         set_pev(botteam[x], pev_solid, 0)       //Not Solid     } createBots() {     new bot, x     for(x = 1; x<3; x++)     {         //is bot in server already?         bot = find_player("bli", botnames[x] )         if(bot) {             botteam[x] = bot             continue         }                 //bot not in server, create them.         bot = engfunc(EngFunc_CreateFakeClient, botnames[x])         botteam[x] = bot         new ptr[128]         dllfunc(DLLFunc_ClientConnect, bot, botnames[x], "127.0.0.1", ptr )         dllfunc(DLLFunc_ClientPutInServer, bot)         select_model(bot, x)     } } select_model(id,team)     switch(team) {         case 1: cs_set_user_team(id, CS_TEAM_T, CS_T_TERROR)         case 2: cs_set_user_team(id, CS_TEAM_CT, CS_CT_URBAN)     }

Again help greatly appreciated
__________________
Loved by Many ....
Hated by Some ....
Respected by All !!!!
BioI-Iazard is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-02-2007 , 03:40   Re: [REQ] Fake Team Bot
Reply With Quote #2

Code:
#DEFINE MIN_PLAYERS 4 public client_putinserver() // Case is wrong on this    if( get_players() > MIN_PLAYERS ) remove_all_bots; public remove_all_bots() {    for( new i; i < sizeof(botteam); i++ ) {       if( is_user_bot(botteam[i] )          engfunc( EngFunc_RemoveEntity, botteam[i] );    } }
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
BioI-Iazard
Senior Member
Join Date: Sep 2005
Location: Calgary, Alberta
Old 10-06-2007 , 18:32   Re: [REQ] Fake Team Bot
Reply With Quote #3

so i just add that on to the bottom of the script?
__________________
Loved by Many ....
Hated by Some ....
Respected by All !!!!
BioI-Iazard is offline
BioI-Iazard
Senior Member
Join Date: Sep 2005
Location: Calgary, Alberta
Old 10-09-2007 , 02:19   Re: [REQ] Fake Team Bot
Reply With Quote #4

yes no??
__________________
Loved by Many ....
Hated by Some ....
Respected by All !!!!
BioI-Iazard is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-09-2007 , 03:36   Re: [REQ] Fake Team Bot
Reply With Quote #5

Jesus man..try it and see???

Yes, that's all you have to do..
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
BadAim
Senior Member
Join Date: Feb 2006
Location: canada
Old 10-10-2007 , 16:36   Re: [REQ] Fake Team Bot
Reply With Quote #6

this plugin is tested? i want this approved! we dont lose any player slots and the round never ends, i liiike it.

edit: i tried it, i have few errors during the compilation, i dont know if my compiler is right cause i have an old version of ven's fakemeta and a 1.75 compiler. lol

watch if your plugin works, habitually my old compiler works

Last edited by BadAim; 10-10-2007 at 16:57.
BadAim is offline
forfun
Member
Join Date: Mar 2008
Old 12-18-2008 , 12:23   Re: [REQ] Fake Team Bot
Reply With Quote #7

That is the thing that I really need, but compilation still comes out with one error:
Code:
/home/groups/amxmodx/tmp3/phpAA7sqd.sma(66) : error 001: expected token: ")", but found "-identifier-"
Please can somebody help me with this?...Thanks

Last edited by forfun; 12-18-2008 at 12:38.
forfun is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-18-2008 , 12:37   Re: [REQ] Fake Team Bot
Reply With Quote #8

Post the updated code so we can help some how... Don't add this to the "bottom"
Code:
#DEFINE MIN_PLAYERS 4
You should leave it right after includes...
SnoW is offline
Send a message via MSN to SnoW
forfun
Member
Join Date: Mar 2008
Old 12-18-2008 , 13:10   Re: [REQ] Fake Team Bot
Reply With Quote #9

well here it is
Code:
// Never do you have to deal with round ending again!
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

#define MIN_PLAYERS 4

new botteam[3]

static const botnames[3][] = {
    "NULL", 
    "Terrorist Team",             //Change Terrorist Bot Name
    "Counter-Terrorist Team"    //Change CT Bot name
    }

public plugin_init() 
{
    register_plugin("Fake TeamBot", "1.0", "OneEyed")
    register_event("HLTV","StartRound","a","1=0","2=0")
    createBots()
}

public StartRound()
    set_task(0.5, "PostStartRound", 0)

public PostStartRound()
    for(new x=1; x<3; x++) {
        set_pev(botteam[x], pev_effects, (pev(botteam[x], pev_effects) | 128) ) //set invisible
        set_pev(botteam[x], pev_solid, 0)         //Not Solid
    }

createBots()
{
    new bot, x
    for(x = 1; x<3; x++) 
    {
        //is bot in server already?
        bot = find_player("bli", botnames[x] )
        if(bot) {
            botteam[x] = bot
            continue
        }
        
        //bot not in server, create them.
        bot = engfunc(EngFunc_CreateFakeClient, botnames[x])
        botteam[x] = bot
        new ptr[128]
        dllfunc(DLLFunc_ClientConnect, bot, botnames[x], "127.0.0.1", ptr )
        dllfunc(DLLFunc_ClientPutInServer, bot)
        select_model(bot, x)
    }
}

select_model(id,team)
    switch(team) {
        case 1: cs_set_user_team(id, CS_TEAM_T, CS_T_TERROR)
        case 2: cs_set_user_team(id, CS_TEAM_CT, CS_CT_URBAN)
    }

public client_putinserver()
       if( get_playersnum() > MIN_PLAYERS ) remove_all_bots;

public remove_all_bots() {
    for( new i; i < sizeof(botteam); i++ ) {
          if( is_user_bot(botteam[i] )
             engfunc( EngFunc_RemoveEntity, botteam[i] );
       }
}

Last edited by forfun; 12-18-2008 at 13:13.
forfun is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-18-2008 , 13:35   Re: [REQ] Fake Team Bot
Reply With Quote #10

Okay you only copied the code and didn't do the mistake, still you should check the line what the compiler says to u, I mean before posting to get help. It's just what the compiler says...:
Code:
if( is_user_bot(botteam[i] )
->
Code:
if( is_user_bot(botteam[i] ))
SnoW is offline
Send a message via MSN to SnoW
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode