Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HEALTH_NEEDED <- 50
- _lastDest <- 0;
- function Teleport(who, where)
- {
- who.SetOrigin(where.GetOrigin());
- }
- function Think()
- {
- ent <- null;
- while((ent = Entities.FindByClassname(ent, "player")) != null)
- {
- if(ent.GetHealth() <= HEALTH_NEEDED)
- Teleport(ent, GetDestination());
- }
- }
- function GetDestination()
- {
- ent <- EntityGroup[_lastDest];
- if(_lastDest < EntityGroup.len())
- _lastDest += 1;
- else
- _lastDest = 0;
- return ent;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement