Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetPlayers()
- {
- //This doesn't find bots, only players
- PLAYERS <- {}
- ent <- null
- while((ent = Entities.FindByClassname(ent, "player")) != null)
- {
- PLAYERS[ent] <- 1;
- }
- return PLAYERS;
- }
- function GetBots()
- {
- BOTS <- {};
- PLAYERS = GetPlayers();
- //This finds both bots and players
- bot <- null;
- while((bot = Entities.FindByModel(bot, "models/player/custom_player/legacy/ctm_st6.mdl")) != null)
- {
- try
- {
- if(PLAYERS[bot] == null)
- continue;
- }
- catch(exception)
- {
- BOTS[bot] <- 1;
- }
- }
- while((bot = Entities.FindByModel(bot, "models/player/custom_player/legacy/tm_phoenix.mdl")) != null)
- {
- try
- {
- if(PLAYERS[bot] == null)
- continue;
- }
- catch(exception)
- {
- BOTS[bot] <- 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement