View Single Post
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