Advertisement
Guest User

Untitled

a guest
Mar 17th, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fakemeta>
  3. #include <cstrike>
  4.  
  5. new botteam[3]
  6.  
  7. static const botnames[3][] = {
  8. "NULL",
  9. "Terorist BOT", //Change Terrorist Bot Name
  10. "Counter-Terorist BOT" //Change CT Bot name
  11. }
  12.  
  13. public plugin_init()
  14. {
  15. register_plugin("Fake TeamBot", "1.1", "cap")
  16. createBots()
  17. }
  18.  
  19. public StartRound()
  20. set_task(0.5, "PostStartRound", 0)
  21.  
  22. public PostStartRound()
  23. for(new x=1; x<3; x++) {
  24. set_pev(botteam[x], pev_effects, (pev(botteam[x], pev_effects) | 128) ) //set invisible
  25. set_pev(botteam[x], pev_solid, 0) //Not Solid
  26. }
  27.  
  28. createBots()
  29. {
  30. new bot, x
  31. for(x = 1; x<3; x++)
  32. {
  33. //is bot in server already?
  34. bot = find_player("bli", botnames[x] )
  35. if(bot) {
  36. botteam[x] = bot
  37. continue
  38. }
  39.  
  40. //bot not in server, create them.
  41. bot = engfunc(EngFunc_CreateFakeClient, botnames[x])
  42. botteam[x] = bot
  43. new ptr[128]
  44. dllfunc(DLLFunc_ClientConnect, bot, botnames[x], "127.0.0.1", ptr )
  45. dllfunc(DLLFunc_ClientPutInServer, bot)
  46. select_model(bot, x)
  47. }
  48. }
  49.  
  50. select_model(id,team)
  51. switch(team) {
  52. case 1: cs_set_user_team(id, CS_TEAM_UNASSIGNED)
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement