Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <fakemeta>
- #include <cstrike>
- new botteam[3]
- static const botnames[3][] = {
- "NULL",
- "Terorist BOT", //Change Terrorist Bot Name
- "Counter-Terorist BOT" //Change CT Bot name
- }
- public plugin_init()
- {
- register_plugin("Fake TeamBot", "1.1", "cap")
- 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_UNASSIGNED)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement