.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Releases, Installers, Docs & Coding
Releases, Installers, Docs & Coding Where the official development happens

Reply
 
Thread Tools
PODBot and the cs_set_team function
Old
  (#1)
blooblood
Member
 
Status: Offline
Posts: 2
Join Date: Feb 2008
Default PODBot and the cs_set_team function - 04-02-2008

Hi. I using the function cs_set_user_team(AMXX) on players while they are alive to switch team and my problem is that it mess up the bot's targeting (it does not know which one is friendly.) Can anyone help me out?
  
Reply With Quote
Re: PODBot and the cs_set_team function
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: PODBot and the cs_set_team function - 04-02-2008

Respawn the player after using cs_set_user_team and the info about teams will be also sent to the bots. If is not - the bot is thinking the team of the player is from the moment before using at him cs_set_user_team.
  
Reply With Quote
Re: PODBot and the cs_set_team function
Old
  (#3)
blooblood
Member
 
Status: Offline
Posts: 2
Join Date: Feb 2008
Default Re: PODBot and the cs_set_team function - 05-02-2008

That sorta fixes my problem. This time I changed team, respawned the player, and move the bot back to its original origin, code below. Anyways the attacker wont stop attacking the victim until the attacker "lost sight" of the victim.

PHP Code:
register_event("Damage""event_damage""be""2!0")
...
public 
event_damage(id)
{
 new 
attacker get_user_attacker(id)
 if(!
is_user_alive(attacker))
  return 
PLUGIN_CONTINUE
 
 cs_set_user_team
(idcs_get_user_team(attacker))
 
 static 
Float:origin[3]
 
pev(idpev_originorigin)
 
cs_user_spawn(id)
 
set_pev(idpev_originorigin)
 
 return 
PLUGIN_CONTINUE

  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com